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

Safe HaskellSafe-Inferred
LanguageHaskell2010

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 ByteString (Maybe UserName) (Maybe ServerName)

Nickname Prefix

data Message Source

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

Formatting functions

encode :: Message -> ByteString Source

Encode a message to its string representation

translateReply Source

Arguments

:: Command

Reply

-> ByteString

Text translation

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

Deprecated

render :: Message -> ByteString Source

This is the deprecated version of encode