irc-0.2.3: A small library for parsing IRC messages.ContentsIndex
Network.IRC.Types
Contents
Type Synonyms
Properties
IRC Datatypes
Formatting functions
Description
Datatypes for representing IRC messages, as well as formatting them.
Synopsis
type Parameter = String
type ServerName = String
type UserName = String
type RealName = String
type Command = String
class Prop a where
renderProp :: a -> String
data Mode p where
Add :: Prop p => [p] -> Mode p
Remove :: Prop p => [p] -> Mode p
data UserProp
= UserOp
| Invisible
| ServerNotices
| Wallops
data ChanProp
= ChanOp
| Private
| Secret
| InviteOnly
| TopicOpOnly
| NoOutsideMessages
| Moderated
| UserLimit
| BanMask
| Speak
| Password
data Prefix
= Server ServerName
| NickName String Maybe UserName Maybe ServerName
data Message = Message Maybe Prefix Command [Parameter]
render :: Message -> String
renderMode :: Prop p => Mode p -> String
translateReply :: Command -> String
Type Synonyms
type Parameter = String
type ServerName = String
type UserName = String
type RealName = String
type Command = String
Properties
class Prop a where
Property class
Methods
renderProp :: a -> String
show/hide Instances
data Mode p where
IRC Modes
Constructors
Add :: Prop p => [p] -> Mode p
Remove :: Prop p => [p] -> Mode p
show/hide Instances
Show p => Show (Mode p)
data UserProp
User properties
Constructors
UserOp
Invisible
ServerNotices
Wallops
show/hide Instances
data ChanProp
Channel properties
Constructors
ChanOp
Private
Secret
InviteOnly
TopicOpOnly
NoOutsideMessages
Moderated
UserLimit
BanMask
Speak
Password
show/hide Instances
IRC Datatypes
data Prefix
The optional beginning of an IRC messages
Constructors
Server ServerNameServer Prefix
NickName String Maybe UserName Maybe ServerNameNickname Prefix
show/hide Instances
data Message
IRC messages are parsed as: [ ':' prefix space ] command { space param } crlf
Constructors
Message Maybe Prefix Command [Parameter]IRC Message
show/hide Instances
Formatting functions
render
:: MessageIRC Message
-> StringRendered message
Message rendering
renderMode :: Prop p => Mode p -> String
translateReply
:: CommandReply
-> StringText translation
Translate a reply into the text version of the reply. If no text version is available, the argument is returned.
Produced by Haddock version 2.1.0