Copyright | (c) 2016 Michael Walker |
---|---|
License | MIT |
Maintainer | Michael Walker <mike@barrucadu.co.uk> |
Stability | experimental |
Portability | portable |
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 s -> StatefulIRC s ()
- reply :: UnicodeEvent -> Text -> StatefulIRC s ()
- ctcp :: Text -> Text -> [Text] -> UnicodeMessage
- ctcpReply :: Text -> Text -> [Text] -> UnicodeMessage
- isConnected :: StatefulIRC s Bool
- isDisconnecting :: StatefulIRC s Bool
- isDisconnected :: StatefulIRC s Bool
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.
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