Copyright | (c) Dominik Picheta 2010 |
---|---|
License | BSD3 |
Maintainer | morfeusz8@gmail.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Messages (parsing) module
- data IrcMessage = IrcMessage {
- mNick :: Maybe ByteString
- mUser :: Maybe ByteString
- mHost :: Maybe ByteString
- mServer :: Maybe ByteString
- mCode :: ByteString
- mMsg :: ByteString
- mChan :: Maybe ByteString
- mOrigin :: Maybe ByteString
- mOther :: Maybe [ByteString]
- mRaw :: ByteString
- data Command
- = MPrivmsg ByteString ByteString
- | MJoin ByteString (Maybe ByteString)
- | MPart ByteString ByteString
- | MMode ByteString ByteString (Maybe ByteString)
- | MTopic ByteString (Maybe ByteString)
- | MInvite ByteString ByteString
- | MKick ByteString ByteString ByteString
- | MQuit ByteString
- | MNick ByteString
- | MNotice ByteString ByteString
- | MAction ByteString ByteString
- parse :: ByteString -> IrcMessage
- showCommand :: Command -> ByteString
Documentation
data IrcMessage Source
IrcMessage | |
|
MPrivmsg ByteString ByteString | PRIVMSG #chan :msg |
MJoin ByteString (Maybe ByteString) | JOIN #chan key |
MPart ByteString ByteString | PART #chan :msg |
MMode ByteString ByteString (Maybe ByteString) | MODE #chan +o user |
MTopic ByteString (Maybe ByteString) | TOPIC #chan :topic |
MInvite ByteString ByteString | INVITE user #chan |
MKick ByteString ByteString ByteString | KICK #chan user :msg |
MQuit ByteString | QUIT :msg |
MNick ByteString | NICK newnick |
MNotice ByteString ByteString | NOTICE usr/#chan :msg |
MAction ByteString ByteString | PRIVMSG usr/#chan :ACTION msg |
parse :: ByteString -> IrcMessage Source
Parse a raw IRC message
showCommand :: Command -> ByteString Source