irc-0.5.0.0: A small library for parsing IRC messages.

Safe HaskellSafe-Infered

Network.IRC.Base

Contents

Description

Datatypes for representing IRC messages, as well as formatting them.

Synopsis

Type Synonyms

IRC Datatypes

data Prefix Source

The optional beginning of an IRC messages

Constructors

Server ServerName

Server Prefix

NickName String (Maybe UserName) (Maybe ServerName)

Nickname Prefix

data Message Source

IRC messages are parsed as: [ : prefix space ] command { space param } crlf

Formatting functions

encode :: Message -> StringSource

Encode a message to its string representation

translateReplySource

Arguments

:: Command

Reply

-> String

Text translation

Translate a reply into its text description. If no text is available, the argument is returned.

Deprecated

render :: Message -> StringSource

This is the deprecated version of encode