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

Stabilityalpha
MaintainerErtugrul Soeylemez <es@ertes.de>

Network.FastIRC.Utils

Contents

Description

Utility functions for parsing IRC messages.

Synopsis

Character predicates for IRC

isChannelChar :: Char -> BoolSource

Character predicate for channel names.

isChanPwdChar :: Char -> BoolSource

Character predicate for channel passwords.

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.

isUserSpecChar :: Char -> BoolSource

Character predicate for nicknames, usernames and hostnames.

Other helper functions

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

Run a parser completely.