Safe Haskell | None |
---|---|
Language | Haskell2010 |
Commonly-used utility functions for IRC clients.
- setNick :: Text -> StatefulIRC s ()
- leaveChannel :: Text -> Maybe Text -> StatefulIRC s ()
- delChan :: TVar (InstanceConfig s) -> Text -> STM ()
- addHandler :: EventHandler () -> StatefulIRC () ()
- reply :: UnicodeEvent -> Text -> StatefulIRC s ()
- ctcp :: Text -> Text -> [Text] -> UnicodeMessage
- ctcpReply :: Text -> Text -> [Text] -> UnicodeMessage
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.