simpleirc-0.3.0: Simple IRC Library

Copyright(c) Dominik Picheta 2010
LicenseBSD3
Maintainermorfeusz8@gmail.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Network.SimpleIRC.Messages

Description

Messages (parsing) module

Synopsis

Documentation

data IrcMessage Source

Constructors

IrcMessage 

Fields

mNick :: Maybe ByteString
 
mUser :: Maybe ByteString
 
mHost :: Maybe ByteString
 
mServer :: Maybe ByteString
 
mCode :: ByteString
 
mMsg :: ByteString
 
mChan :: Maybe ByteString
 
mOrigin :: Maybe ByteString

Origin of the message, this is mNick if a message was sent directly to the bot, otherwise if it got sent to the channel it's mChan.

mOther :: Maybe [ByteString]
 
mRaw :: ByteString
 

data Command Source

Constructors

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