Datatypes for representing IRC messages, as well as formatting them.
- 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
- 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 ServerName = StringSource
Properties
IRC Modes
User properties
Channel properties
IRC Datatypes
The optional beginning of an IRC messages
Server ServerName | Server Prefix |
NickName String (Maybe UserName) (Maybe ServerName) | Nickname Prefix |
IRC messages are parsed as:
[ :
prefix space ] command { space param } crlf
Formatting functions
renderMode :: Prop p => Mode p -> StringSource
Translate a reply into the text version of the reply. If no text version is available, the argument is returned.