Safe Haskell | None |
---|---|
Language | Haskell98 |
The IRC module processes the IRC protocol and provides a nice API for sending and recieving IRC messages with an IRC server.
- data IrcMessage = IrcMessage {
- ircMsgServer :: !String
- ircMsgLBName :: !String
- ircMsgPrefix :: !String
- ircMsgCommand :: !String
- ircMsgParams :: ![String]
- joinChannel :: Nick -> IrcMessage
- partChannel :: Nick -> IrcMessage
- getTopic :: Nick -> IrcMessage
- setTopic :: Nick -> String -> IrcMessage
- codepage :: String -> String -> IrcMessage
- privmsg :: Nick -> String -> IrcMessage
- quit :: String -> String -> IrcMessage
- timeReply :: IrcMessage -> IrcMessage
- pass :: String -> String -> IrcMessage
- user :: String -> String -> String -> String -> IrcMessage
- setNick :: Nick -> IrcMessage
Documentation
data IrcMessage Source
An IRC message is a server, a prefix, a command and a list of parameters.
IrcMessage | |
|
joinChannel :: Nick -> IrcMessage Source
partChannel :: Nick -> IrcMessage Source
getTopic :: Nick -> IrcMessage Source
setTopic :: Nick -> String -> IrcMessage Source
codepage :: String -> String -> IrcMessage Source
codepage
creates a server CODEPAGE message. The input string given is the
codepage name for current session.
:: Nick | Who should recieve the message (nick) |
-> String | What is the message? |
-> IrcMessage | Constructed message |
privmsg
creates a private message to the person designated.
quit :: String -> String -> IrcMessage Source
quit
creates a server QUIT message. The input string given is the
quit message, given to other parties when leaving the network.
timeReply :: IrcMessage -> IrcMessage Source
Construct a privmsg from the CTCP TIME notice, to feed up to the @localtime-reply plugin, which then passes the output to the appropriate client.
pass :: String -> String -> IrcMessage Source
setNick :: Nick -> IrcMessage Source