fastirc-0.1.1: Fast Internet Relay Chat (IRC) library

Stabilityexperimental
MaintainerErtugrul Soeylemez

Network.FastIRC.Utils

Contents

Description

Utility functions for parsing IRC messages.

Synopsis

Character predicates for IRC

isCommandChar :: Char -> BoolSource

Character predicate for IRC commands.

isHostChar :: Char -> BoolSource

Character predicate for IRC user hostnames. In the string x!y@z the substring z is the user's hostname.

isIRCEOLChar :: Char -> BoolSource

Character predicate for IRC end of line characters.

isIRCTokChar :: Char -> BoolSource

Character predicate for IRC tokens.

isMessageChar :: Char -> BoolSource

Character predicate for IRC messages.

isNickChar :: Char -> BoolSource

Character predicate for IRC nicknames. This function considers high bytes (0x80 to 0xFF) and most nonstandard ASCII bytes as valid, because most modern IRC daemons allow nonstandard nicknames.

isServerChar :: Char -> BoolSource

Character predicate for IRC servers.

isUserChar :: Char -> BoolSource

Character predicate for IRC usernames. In the string x!y@z the substring y is the user's username.

Other helper functions

parseComplete :: Parser a -> ByteString -> Maybe aSource

Run a parser completely.