irc-client-0.4.4.3: An IRC client library.

Copyright(c) 2016 Michael Walker
LicenseMIT
MaintainerMichael Walker <mike@barrucadu.co.uk>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.IRC.Client.Utils

Description

Commonly-used utility functions for IRC clients.

Synopsis

Documentation

setNick :: Text -> StatefulIRC s () Source #

Update the nick in the instance configuration and also send an update message to the server. This doesn't attempt to resolve nick collisions, that's up to the event handlers.

leaveChannel :: Text -> Maybe Text -> StatefulIRC s () Source #

Update the channel list in the instance configuration and also part the channel.

delChan :: TVar (InstanceConfig s) -> Text -> STM () Source #

Remove a channel from the list without sending a part command (be careful not to let the channel list get out of sync with the real-world state if you use it for anything!)

addHandler :: EventHandler s -> StatefulIRC s () Source #

Add an event handler

reply :: UnicodeEvent -> Text -> StatefulIRC s () Source #

Send a message to the source of an event.

ctcp :: Text -> Text -> [Text] -> UnicodeMessage Source #

Construct a PRIVMSG containing a CTCP

ctcpReply :: Text -> Text -> [Text] -> UnicodeMessage Source #

Construct a NOTICE containing a CTCP

isConnected :: StatefulIRC s Bool Source #

Check if the client is connected.

isDisconnecting :: StatefulIRC s Bool Source #

Check if the client is in the process of disconnecting.

isDisconnected :: StatefulIRC s Bool Source #

Check if the client is disconnected