Safe Haskell | None |
---|---|
Language | Haskell98 |
The IRC module processes the IRC protocol and provides a nice API for sending and receiving IRC messages with an IRC server.
Synopsis
- 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.
Note that the strings here are treated as lists of bytes!
IrcMessage | |
|
Instances
Show IrcMessage Source # | |
Defined in Lambdabot.IRC showsPrec :: Int -> IrcMessage -> ShowS # show :: IrcMessage -> String # showList :: [IrcMessage] -> ShowS # | |
Message IrcMessage Source # | |
Defined in Lambdabot.IRC server :: IrcMessage -> String Source # nick :: IrcMessage -> Nick Source # fullName :: IrcMessage -> String Source # channels :: IrcMessage -> [Nick] Source # lambdabotName :: IrcMessage -> Nick Source # |
joinChannel :: Nick -> IrcMessage Source #
partChannel :: Nick -> IrcMessage Source #
getTopic :: Nick -> 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 receive 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.
setNick :: Nick -> IrcMessage Source #