irc-client-0.2.6.0: An IRC client library.

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 () -> StatefulIRC () () Source

Add an eventHandler

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