irc-0.4.4.2: A small library for parsing IRC messages.Source codeContentsIndex
Network.IRC.Base
Contents
Type Synonyms
IRC Datatypes
Formatting functions
Deprecated
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
data Prefix
= Server ServerName
| NickName String (Maybe UserName) (Maybe ServerName)
data Message = Message {
msg_prefix :: Maybe Prefix
msg_command :: Command
msg_params :: [Parameter]
}
encode :: Message -> String
showMessage :: Message -> String
showPrefix :: Prefix -> String
showParameters :: [Parameter] -> String
translateReply :: Command -> String
replyTable :: [(String, String)]
render :: Message -> String
Type Synonyms
type Parameter = StringSource
type ServerName = StringSource
type UserName = StringSource
type RealName = StringSource
type Command = StringSource
IRC Datatypes
data Prefix Source
The optional beginning of an IRC messages
Constructors
Server ServerNameServer Prefix
NickName String (Maybe UserName) (Maybe ServerName)Nickname Prefix
data Message Source
IRC messages are parsed as: [ ':' prefix space ] command { space param } crlf
Constructors
Message
msg_prefix :: Maybe Prefix
msg_command :: Command
msg_params :: [Parameter]
Formatting functions
encode :: Message -> StringSource
Encode a message to its string representation
showMessage :: Message -> StringSource
showPrefix :: Prefix -> StringSource
showParameters :: [Parameter] -> StringSource
translateReplySource
:: CommandReply
-> StringText translation
Translate a reply into its text description. If no text is available, the argument is returned.
replyTable :: [(String, String)]Source
Deprecated
render :: Message -> StringSource
This is the deprecated version of encode
Produced by Haddock version 2.6.0