-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | IRC core library for glirc -- -- IRC core library for glirc -- -- The glirc client has been split off into -- https://hackage.haskell.org/package/glirc @package irc-core @version 2.11 -- | This module defines support for working with IRC's numeric reply -- codes. Pattern synonyms are provided for each of the possible IRC -- reply codes. -- -- Reply code information was extracted from -- https://www.alien.net.au/irc/irc2numerics.html module Irc.Codes -- | Type of numeric reply codes newtype ReplyCode ReplyCode :: Word -> ReplyCode -- | Categories for reply codes data ReplyType -- | 0-99 Messages between client and server ClientServerReply :: ReplyType -- | 200-399 Responses to commands CommandReply :: ReplyType -- | 400-599 Errors ErrorReply :: ReplyType -- | Uncategorized UnknownReply :: ReplyType pattern RPL_WELCOME :: ReplyCode pattern RPL_YOURHOST :: ReplyCode pattern RPL_CREATED :: ReplyCode pattern RPL_MYINFO :: ReplyCode pattern RPL_ISUPPORT :: ReplyCode pattern RPL_SNOMASK :: ReplyCode pattern RPL_STATMEMTOT :: ReplyCode pattern RPL_REDIR :: ReplyCode pattern RPL_YOURCOOKIE :: ReplyCode pattern RPL_MAP :: ReplyCode pattern RPL_MAPEND :: ReplyCode pattern RPL_YOURID :: ReplyCode pattern RPL_SAVENICK :: ReplyCode pattern RPL_ATTEMPTINGJUNC :: ReplyCode pattern RPL_ATTEMPTINGREROUTE :: ReplyCode pattern RPL_REMOTESUPPORT :: ReplyCode pattern RPL_TRACELINK :: ReplyCode pattern RPL_TRACECONNECTING :: ReplyCode pattern RPL_TRACEHANDSHAKE :: ReplyCode pattern RPL_TRACEUNKNOWN :: ReplyCode pattern RPL_TRACEOPERATOR :: ReplyCode pattern RPL_TRACEUSER :: ReplyCode pattern RPL_TRACESERVER :: ReplyCode pattern RPL_TRACESERVICE :: ReplyCode pattern RPL_TRACENEWTYPE :: ReplyCode pattern RPL_TRACECLASS :: ReplyCode pattern RPL_TRACERECONNECT :: ReplyCode pattern RPL_STATS :: ReplyCode pattern RPL_STATSLINKINFO :: ReplyCode pattern RPL_STATSCOMMANDS :: ReplyCode pattern RPL_STATSCLINE :: ReplyCode pattern RPL_STATSNLINE :: ReplyCode pattern RPL_STATSILINE :: ReplyCode pattern RPL_STATSKLINE :: ReplyCode pattern RPL_STATSQLINE :: ReplyCode pattern RPL_STATSYLINE :: ReplyCode pattern RPL_ENDOFSTATS :: ReplyCode pattern RPL_STATSPLINE :: ReplyCode pattern RPL_UMODEIS :: ReplyCode pattern RPL_SQLINE_NICK :: ReplyCode pattern RPL_STATSDLINE :: ReplyCode pattern RPL_STATSCOUNT :: ReplyCode pattern RPL_SERVICEINFO :: ReplyCode pattern RPL_ENDOFSERVICES :: ReplyCode pattern RPL_SERVICE :: ReplyCode pattern RPL_SERVLIST :: ReplyCode pattern RPL_SERVLISTEND :: ReplyCode pattern RPL_STATSVERBOSE :: ReplyCode pattern RPL_STATSIAUTH :: ReplyCode pattern RPL_STATSLLINE :: ReplyCode pattern RPL_STATSUPTIME :: ReplyCode pattern RPL_STATSOLINE :: ReplyCode pattern RPL_STATSHLINE :: ReplyCode pattern RPL_STATSSLINE :: ReplyCode pattern RPL_STATSPING :: ReplyCode pattern RPL_STATSXLINE :: ReplyCode pattern RPL_STATSULINE :: ReplyCode pattern RPL_STATSDEBUG :: ReplyCode pattern RPL_STATSCONN :: ReplyCode pattern RPL_LUSERCLIENT :: ReplyCode pattern RPL_LUSEROP :: ReplyCode pattern RPL_LUSERUNKNOWN :: ReplyCode pattern RPL_LUSERCHANNELS :: ReplyCode pattern RPL_LUSERME :: ReplyCode pattern RPL_ADMINME :: ReplyCode pattern RPL_ADMINLOC1 :: ReplyCode pattern RPL_ADMINLOC2 :: ReplyCode pattern RPL_ADMINEMAIL :: ReplyCode pattern RPL_TRACELOG :: ReplyCode pattern RPL_ENDOFTRACE :: ReplyCode pattern RPL_LOAD2HI :: ReplyCode pattern RPL_LOCALUSERS :: ReplyCode pattern RPL_GLOBALUSERS :: ReplyCode pattern RPL_START_NETSTAT :: ReplyCode pattern RPL_NETSTAT :: ReplyCode pattern RPL_END_NETSTAT :: ReplyCode pattern RPL_PRIVS :: ReplyCode pattern RPL_SILELIST :: ReplyCode pattern RPL_ENDOFSILELIST :: ReplyCode pattern RPL_NOTIFY :: ReplyCode pattern RPL_ENDNOTIFY :: ReplyCode pattern RPL_STATSDELTA :: ReplyCode pattern RPL_WHOISCERTFP :: ReplyCode pattern RPL_VCHANLIST :: ReplyCode pattern RPL_VCHANHELP :: ReplyCode pattern RPL_GLIST :: ReplyCode pattern RPL_ACCEPTLIST :: ReplyCode pattern RPL_ENDOFACCEPT :: ReplyCode pattern RPL_ENDOFJUPELIST :: ReplyCode pattern RPL_FEATURE :: ReplyCode pattern RPL_DATASTR :: ReplyCode pattern RPL_END_CHANINFO :: ReplyCode pattern RPL_NONE :: ReplyCode pattern RPL_AWAY :: ReplyCode pattern RPL_USERHOST :: ReplyCode pattern RPL_ISON :: ReplyCode pattern RPL_TEXT :: ReplyCode pattern RPL_UNAWAY :: ReplyCode pattern RPL_NOWAWAY :: ReplyCode pattern RPL_WHOISREGNICK :: ReplyCode pattern RPL_SUSERHOST :: ReplyCode pattern RPL_NOTIFYACTION :: ReplyCode pattern RPL_WHOISADMIN :: ReplyCode pattern RPL_NICKTRACE :: ReplyCode pattern RPL_WHOISSADMIN :: ReplyCode pattern RPL_WHOISHELPER :: ReplyCode pattern RPL_WHOISHELPOP :: ReplyCode pattern RPL_WHOISUSER :: ReplyCode pattern RPL_WHOISSERVER :: ReplyCode pattern RPL_WHOISOPERATOR :: ReplyCode pattern RPL_WHOWASUSER :: ReplyCode pattern RPL_ENDOFWHO :: ReplyCode pattern RPL_WHOISCHANOP :: ReplyCode pattern RPL_WHOISIDLE :: ReplyCode pattern RPL_ENDOFWHOIS :: ReplyCode pattern RPL_WHOISCHANNELS :: ReplyCode pattern RPL_WHOISSPECIAL :: ReplyCode pattern RPL_LISTSTART :: ReplyCode pattern RPL_LIST :: ReplyCode pattern RPL_LISTEND :: ReplyCode pattern RPL_CHANNELMODEIS :: ReplyCode pattern RPL_CHANNELMLOCKIS :: ReplyCode pattern RPL_NOCHANPASS :: ReplyCode pattern RPL_CHPASSUNKNOWN :: ReplyCode pattern RPL_CHANNEL_URL :: ReplyCode pattern RPL_CREATIONTIME :: ReplyCode pattern RPL_WHOISACCOUNT :: ReplyCode pattern RPL_NOTOPIC :: ReplyCode pattern RPL_TOPIC :: ReplyCode pattern RPL_TOPICWHOTIME :: ReplyCode pattern RPL_LISTUSAGE :: ReplyCode pattern RPL_COMMANDSYNTAX :: ReplyCode pattern RPL_LISTSYNTAX :: ReplyCode pattern RPL_WHOISACTUALLY :: ReplyCode pattern RPL_BADCHANPASS :: ReplyCode pattern RPL_INVITING :: ReplyCode pattern RPL_SUMMONING :: ReplyCode pattern RPL_INVITED :: ReplyCode pattern RPL_INVEXLIST :: ReplyCode pattern RPL_ENDOFINVEXLIST :: ReplyCode pattern RPL_EXCEPTLIST :: ReplyCode pattern RPL_ENDOFEXCEPTLIST :: ReplyCode pattern RPL_VERSION :: ReplyCode pattern RPL_WHOREPLY :: ReplyCode pattern RPL_NAMREPLY :: ReplyCode pattern RPL_WHOSPCRPL :: ReplyCode pattern RPL_NAMREPLY_ :: ReplyCode pattern RPL_WHOWASREAL :: ReplyCode pattern RPL_KILLDONE :: ReplyCode pattern RPL_CLOSING :: ReplyCode pattern RPL_CLOSEEND :: ReplyCode pattern RPL_LINKS :: ReplyCode pattern RPL_ENDOFLINKS :: ReplyCode pattern RPL_ENDOFNAMES :: ReplyCode pattern RPL_BANLIST :: ReplyCode pattern RPL_ENDOFBANLIST :: ReplyCode pattern RPL_ENDOFWHOWAS :: ReplyCode pattern RPL_INFO :: ReplyCode pattern RPL_MOTD :: ReplyCode pattern RPL_INFOSTART :: ReplyCode pattern RPL_ENDOFINFO :: ReplyCode pattern RPL_MOTDSTART :: ReplyCode pattern RPL_ENDOFMOTD :: ReplyCode pattern RPL_WHOISHOST :: ReplyCode pattern RPL_WHOISMODES :: ReplyCode pattern RPL_YOUREOPER :: ReplyCode pattern RPL_REHASHING :: ReplyCode pattern RPL_YOURESERVICE :: ReplyCode pattern RPL_MYPORTIS :: ReplyCode pattern RPL_NOTOPERANYMORE :: ReplyCode pattern RPL_RSACHALLENGE :: ReplyCode pattern RPL_TIME :: ReplyCode pattern RPL_USERSSTART :: ReplyCode pattern RPL_USERS :: ReplyCode pattern RPL_ENDOFUSERS :: ReplyCode pattern RPL_NOUSERS :: ReplyCode pattern RPL_HOSTHIDDEN :: ReplyCode pattern ERR_UNKNOWNERROR :: ReplyCode pattern ERR_NOSUCHNICK :: ReplyCode pattern ERR_NOSUCHSERVER :: ReplyCode pattern ERR_NOSUCHCHANNEL :: ReplyCode pattern ERR_CANNOTSENDTOCHAN :: ReplyCode pattern ERR_TOOMANYCHANNELS :: ReplyCode pattern ERR_WASNOSUCHNICK :: ReplyCode pattern ERR_TOOMANYTARGETS :: ReplyCode pattern ERR_NOORIGIN :: ReplyCode pattern ERR_INVALIDCAPCMD :: ReplyCode pattern ERR_NORECIPIENT :: ReplyCode pattern ERR_NOTEXTTOSEND :: ReplyCode pattern ERR_NOTOPLEVEL :: ReplyCode pattern ERR_WILDTOPLEVEL :: ReplyCode pattern ERR_MSGNEEDREGGEDNICK :: ReplyCode pattern ERR_TOOMANYMATCHES :: ReplyCode pattern ERR_LENGTHTRUNCATED :: ReplyCode pattern ERR_UNKNOWNCOMMAND :: ReplyCode pattern ERR_NOMOTD :: ReplyCode pattern ERR_NOADMININFO :: ReplyCode pattern ERR_FILEERROR :: ReplyCode pattern ERR_NOOPERMOTD :: ReplyCode pattern ERR_TOOMANYAWAY :: ReplyCode pattern ERR_EVENTNICKCHANGE :: ReplyCode pattern ERR_NONICKNAMEGIVEN :: ReplyCode pattern ERR_ERRONEUSNICKNAME :: ReplyCode pattern ERR_NICKNAMEINUSE :: ReplyCode pattern ERR_SERVICENAMEINUSE :: ReplyCode pattern ERR_NORULES :: ReplyCode pattern ERR_BANNICKCHANGE :: ReplyCode pattern ERR_NICKCOLLISION :: ReplyCode pattern ERR_UNAVAILRESOURCE :: ReplyCode pattern ERR_NICKTOOFAST :: ReplyCode pattern ERR_TARGETTOOFAST :: ReplyCode pattern ERR_SERVICESDOWN :: ReplyCode pattern ERR_USERNOTINCHANNEL :: ReplyCode pattern ERR_NOTONCHANNEL :: ReplyCode pattern ERR_USERONCHANNEL :: ReplyCode pattern ERR_NOLOGIN :: ReplyCode pattern ERR_SUMMONDISABLED :: ReplyCode pattern ERR_USERSDISABLED :: ReplyCode pattern ERR_NONICKCHANGE :: ReplyCode pattern ERR_NOTIMPLEMENTED :: ReplyCode pattern ERR_NOTREGISTERED :: ReplyCode pattern ERR_IDCOLLISION :: ReplyCode pattern ERR_NICKLOST :: ReplyCode pattern ERR_HOSTILENAME :: ReplyCode pattern ERR_ACCEPTFULL :: ReplyCode pattern ERR_ACCEPTEXIST :: ReplyCode pattern ERR_ACCEPTNOT :: ReplyCode pattern ERR_NOHIDING :: ReplyCode pattern ERR_NOTFORHALFOPS :: ReplyCode pattern ERR_NEEDMOREPARAMS :: ReplyCode pattern ERR_ALREADYREGISTERED :: ReplyCode pattern ERR_NOPERMFORHOST :: ReplyCode pattern ERR_PASSWDMISMATCH :: ReplyCode pattern ERR_YOUREBANNEDCREEP :: ReplyCode pattern ERR_YOUWILLBEBANNED :: ReplyCode pattern ERR_KEYSET :: ReplyCode pattern ERR_INVALIDUSERNAME :: ReplyCode pattern ERR_ONLYSERVERSCANCHANGE :: ReplyCode pattern ERR_LINKSET :: ReplyCode pattern ERR_LINKCHANNEL :: ReplyCode pattern ERR_CHANNELISFULL :: ReplyCode pattern ERR_UNKNOWNMODE :: ReplyCode pattern ERR_INVITEONLYCHAN :: ReplyCode pattern ERR_BANNEDFROMCHAN :: ReplyCode pattern ERR_BADCHANNELKEY :: ReplyCode pattern ERR_BADCHANMASK :: ReplyCode pattern ERR_NEEDREGGEDNICK :: ReplyCode pattern ERR_BANLISTFULL :: ReplyCode pattern ERR_BADCHANNAME :: ReplyCode pattern ERR_THROTTLE :: ReplyCode pattern ERR_NOPRIVILEGES :: ReplyCode pattern ERR_CHANOPRIVSNEEDED :: ReplyCode pattern ERR_CANTKILLSERVER :: ReplyCode pattern ERR_ISCHANSERVICE :: ReplyCode pattern ERR_BANNEDNICK :: ReplyCode pattern ERR_NONONREG :: ReplyCode pattern ERR_TSLESSCHAN :: ReplyCode pattern ERR_VOICENEEDED :: ReplyCode pattern ERR_NOOPERHOST :: ReplyCode pattern ERR_NOSERVICEHOST :: ReplyCode pattern ERR_NOFEATURE :: ReplyCode pattern ERR_OWNMODE :: ReplyCode pattern ERR_BADLOGTYPE :: ReplyCode pattern ERR_BADLOGSYS :: ReplyCode pattern ERR_BADLOGVALUE :: ReplyCode pattern ERR_ISOPERLCHAN :: ReplyCode pattern ERR_CHANOWNPRIVNEEDED :: ReplyCode pattern ERR_UMODEUNKNOWNFLAG :: ReplyCode pattern ERR_USERSDONTMATCH :: ReplyCode pattern ERR_GHOSTEDCLIENT :: ReplyCode pattern ERR_USERNOTONSERV :: ReplyCode pattern ERR_SILELISTFULL :: ReplyCode pattern ERR_TOOMANYWATCH :: ReplyCode pattern ERR_WRONGPONG :: ReplyCode pattern ERR_BADEXPIRE :: ReplyCode pattern ERR_DONTCHEAT :: ReplyCode pattern ERR_DISABLED :: ReplyCode pattern ERR_NOINVITE :: ReplyCode pattern ERR_LONGMASK :: ReplyCode pattern ERR_ADMONLY :: ReplyCode pattern ERR_TOOMANYUSERS :: ReplyCode pattern ERR_OPERONLY :: ReplyCode pattern ERR_MASKTOOWIDE :: ReplyCode pattern ERR_WHOTRUNC :: ReplyCode pattern ERR_LISTSYNTAX :: ReplyCode pattern ERR_WHOSYNTAX :: ReplyCode pattern ERR_WHOLIMEXCEED :: ReplyCode pattern ERR_HELPNOTFOUND :: ReplyCode pattern ERR_REMOTEPFX :: ReplyCode pattern ERR_PFXUNROUTABLE :: ReplyCode pattern ERR_BADHOSTMASK :: ReplyCode pattern ERR_HOSTUNAVAIL :: ReplyCode pattern ERR_USINGSLINE :: ReplyCode pattern ERR_STATSSLINE :: ReplyCode pattern RPL_LOGON :: ReplyCode pattern RPL_LOGOFF :: ReplyCode pattern RPL_WATCHOFF :: ReplyCode pattern RPL_WATCHSTAT :: ReplyCode pattern RPL_NOWON :: ReplyCode pattern RPL_NOWOFF :: ReplyCode pattern RPL_WATCHLIST :: ReplyCode pattern RPL_ENDOFWATCHLIST :: ReplyCode pattern RPL_WATCHCLEAR :: ReplyCode pattern RPL_ISOPER :: ReplyCode pattern RPL_ISLOCOP :: ReplyCode pattern RPL_ISNOTOPER :: ReplyCode pattern RPL_ENDOFISOPER :: ReplyCode pattern RPL_DCCSTATUS :: ReplyCode pattern RPL_DCCLIST :: ReplyCode pattern RPL_ENDOFDCCLIST :: ReplyCode pattern RPL_WHOWASHOST :: ReplyCode pattern RPL_DCCINFO :: ReplyCode pattern RPL_RULES :: ReplyCode pattern RPL_ENDOFO :: ReplyCode pattern RPL_SETTINGS :: ReplyCode pattern RPL_ENDOFSETTINGS :: ReplyCode pattern RPL_DUMPING :: ReplyCode pattern RPL_DUMPRPL :: ReplyCode pattern RPL_EODUMP :: ReplyCode pattern RPL_TRACEROUTE_HOP :: ReplyCode pattern RPL_TRACEROUTE_START :: ReplyCode pattern RPL_MODECHANGEWARN :: ReplyCode pattern RPL_CHANREDIR :: ReplyCode pattern RPL_SERVMODEIS :: ReplyCode pattern RPL_OTHERUMODEIS :: ReplyCode pattern RPL_ENDOF_GENERIC :: ReplyCode pattern RPL_STARTTLS :: ReplyCode pattern RPL_WHOISSECURE :: ReplyCode pattern RPL_UNKNOWNMODES :: ReplyCode pattern RPL_CANNOTSETMODES :: ReplyCode pattern RPL_LUSERSTAFF :: ReplyCode pattern RPL_TIMEONSERVERIS :: ReplyCode pattern RPL_NETWORKS :: ReplyCode pattern RPL_YOURLANGUAGEIS :: ReplyCode pattern RPL_LANGUAGE :: ReplyCode pattern RPL_WHOISSTAFF :: ReplyCode pattern RPL_WHOISLANGUAGE :: ReplyCode pattern ERR_STARTTLS :: ReplyCode pattern RPL_MODLIST :: ReplyCode pattern RPL_ENDOFMODLIST :: ReplyCode pattern RPL_HELPSTART :: ReplyCode pattern RPL_HELPTXT :: ReplyCode pattern RPL_ENDOFHELP :: ReplyCode pattern ERR_TARGCHANGE :: ReplyCode pattern RPL_ETRACEFULL :: ReplyCode pattern RPL_ETRACE :: ReplyCode pattern RPL_KNOCK :: ReplyCode pattern RPL_KNOCKDLVR :: ReplyCode pattern ERR_TOOMANYKNOCK :: ReplyCode pattern ERR_CHANOPEN :: ReplyCode pattern ERR_KNOCKONCHAN :: ReplyCode pattern ERR_KNOCKDISABLED :: ReplyCode pattern RPL_TARGUMODEG :: ReplyCode pattern RPL_TARGNOTIFY :: ReplyCode pattern RPL_UMODEGMSG :: ReplyCode pattern RPL_OMOTDSTART :: ReplyCode pattern RPL_OMOTD :: ReplyCode pattern RPL_ENDOFOMOTD :: ReplyCode pattern ERR_NOPRIVS :: ReplyCode pattern RPL_TESTMASK :: ReplyCode pattern RPL_TESTLINE :: ReplyCode pattern RPL_NOTESTLINE :: ReplyCode pattern RPL_TESTMASKGECOS :: ReplyCode pattern RPL_QUIETLIST :: ReplyCode pattern RPL_ENDOFQUIETLIST :: ReplyCode pattern RPL_MONONLINE :: ReplyCode pattern RPL_MONOFFLINE :: ReplyCode pattern RPL_MONLIST :: ReplyCode pattern RPL_ENDOFMONLIST :: ReplyCode pattern ERR_MONLISTFULL :: ReplyCode pattern RPL_RSACHALLENGE2 :: ReplyCode pattern RPL_ENDOFRSACHALLENGE2 :: ReplyCode pattern ERR_MLOCKRESTRICTED :: ReplyCode pattern RPL_SCANMATCHED :: ReplyCode pattern RPL_SCANUMODES :: ReplyCode pattern RPL_XINFO :: ReplyCode pattern RPL_XINFOSTART :: ReplyCode pattern RPL_XINFOEND :: ReplyCode pattern RPL_LOGGEDIN :: ReplyCode pattern RPL_LOGGEDOUT :: ReplyCode pattern RPL_NICKLOCKED :: ReplyCode pattern RPL_SASLSUCCESS :: ReplyCode pattern ERR_SASLFAIL :: ReplyCode pattern ERR_SASLTOOLONG :: ReplyCode pattern ERR_SASLABORTED :: ReplyCode pattern ERR_SASLALREADY :: ReplyCode pattern RPL_SASLMECHS :: ReplyCode pattern ERR_CANNOTDOCOMMAND :: ReplyCode pattern ERR_CANNOTCHANGEUMODE :: ReplyCode pattern ERR_CANNOTCHANGECHANMODE :: ReplyCode pattern ERR_CANNOTCHANGESERVERMODE :: ReplyCode pattern ERR_CANNOTSENDTONICK :: ReplyCode pattern ERR_UNKNOWNSERVERMODE :: ReplyCode pattern ERR_SERVERMODELOCK :: ReplyCode pattern ERR_BADCHARENCODING :: ReplyCode pattern ERR_TOOMANYLANGUAGES :: ReplyCode pattern ERR_NOLANGUAGE :: ReplyCode pattern ERR_TEXTTOOSHORT :: ReplyCode pattern ERR_NUMERIC_ERR :: ReplyCode -- | Information describing the category and human decipherable name of a -- reply. data ReplyCodeInfo ReplyCodeInfo :: !ReplyType -> !Text -> ReplyCodeInfo -- | category [replyCodeType] :: ReplyCodeInfo -> !ReplyType -- | human-decipherable name [replyCodeText] :: ReplyCodeInfo -> !Text -- | Compute information for a reply code replyCodeInfo :: ReplyCode -> ReplyCodeInfo -- | Categorize a reply code using the unknown category and simply showing -- the reply code's number as its name. defaultReplyCodeInfo :: Int -> ReplyCodeInfo -- | Information about reply codes as derived from ircd-seven. replyCodeInfoTable :: Vector ReplyCodeInfo instance GHC.Classes.Ord Irc.Codes.ReplyCode instance GHC.Classes.Eq Irc.Codes.ReplyCode instance GHC.Show.Show Irc.Codes.ReplyType instance GHC.Read.Read Irc.Codes.ReplyType instance GHC.Classes.Ord Irc.Codes.ReplyType instance GHC.Classes.Eq Irc.Codes.ReplyType instance GHC.Read.Read Irc.Codes.ReplyCodeInfo instance GHC.Show.Show Irc.Codes.ReplyCodeInfo instance GHC.Classes.Ord Irc.Codes.ReplyCodeInfo instance GHC.Classes.Eq Irc.Codes.ReplyCodeInfo instance GHC.Show.Show Irc.Codes.ReplyCode instance GHC.Read.Read Irc.Codes.ReplyCode -- | This module defines support for working with IRC's numeric reply -- codes. Pattern synonyms are provided for each of the possible IRC -- reply codes. -- -- Reply code information was extracted from -- https://www.alien.net.au/irc/irc2numerics.html module Irc.Identifier -- | Identifier representing channels and nicknames data Identifier -- | Returns a ByteArray of an Identifier which is suitable -- for comparison or hashing which has been normalized for case. idDenote :: Identifier -> ByteArray -- | Construct an Identifier from a ByteString mkId :: Text -> Identifier -- | Returns the original Text of an Identifier idText :: Identifier -> Text -- | Returns the case-normalized Text for an identifier. idTextNorm :: Identifier -> Text -- | Returns True when the first argument is a prefix of the second. idPrefix :: Identifier -> Identifier -> Bool instance GHC.Classes.Eq Irc.Identifier.Identifier instance GHC.Show.Show Irc.Identifier.Identifier instance GHC.Read.Read Irc.Identifier.Identifier instance GHC.Classes.Ord Irc.Identifier.Identifier instance Data.Hashable.Class.Hashable Irc.Identifier.Identifier instance Data.String.IsString Irc.Identifier.Identifier -- | This module implements a simple rate limiter based on the IRC RFC to -- be used to keep an IRC client from getting disconnected for flooding. -- It allows one event per duration with a given threshold. -- -- This algorithm keeps track of the time at which the client may start -- sending messages. Each message sent advances that time into the future -- by the penalty. The client is allowed to transmit up to -- threshold seconds ahead of this time. module Irc.RateLimit -- | The RateLimit keeps track of rate limit settings as well as the -- current state of the limit. data RateLimit -- | Construct a new rate limit with the given penalty and threshold. newRateLimit :: Rational -> Rational -> IO RateLimit -- | Account for an event in the context of a RateLimit. This -- command will block and delay as required to satisfy the current rate. -- Once it returns it is safe to proceed with the rate limited action. tickRateLimit :: RateLimit -> IO () -- | Information identifying users on IRC. This information includes a -- nickname and optionally a username and hostname. module Irc.UserInfo -- | UserInfo packages a nickname along with the username and -- hsotname if they are known in the current context. data UserInfo UserInfo :: {-# UNPACK #-} !Identifier -> {-# UNPACK #-} !Text -> {-# UNPACK #-} !Text -> UserInfo -- | nickname [userNick] :: UserInfo -> {-# UNPACK #-} !Identifier -- | username, empty when missing [userName] :: UserInfo -> {-# UNPACK #-} !Text -- | hostname, empty when missing [userHost] :: UserInfo -> {-# UNPACK #-} !Text -- | Render UserInfo as nick!username@hostname renderUserInfo :: UserInfo -> Text -- | Split up a hostmask into a nickname, username, and hostname. The -- username and hostname might not be defined but are delimited by a -- ! and @ respectively. parseUserInfo :: Text -> UserInfo -- | Lens into userNick field. uiNick :: Functor f => (Identifier -> f Identifier) -> UserInfo -> f UserInfo -- | Lens into userName field. uiName :: Functor f => (Text -> f Text) -> UserInfo -> f UserInfo -- | Lens into userHost field. uiHost :: Functor f => (Text -> f Text) -> UserInfo -> f UserInfo instance GHC.Show.Show Irc.UserInfo.UserInfo instance GHC.Read.Read Irc.UserInfo.UserInfo instance GHC.Classes.Eq Irc.UserInfo.UserInfo -- | This module provides a parser and printer for the low-level IRC -- message format. It handles splitting up IRC commands into the prefix, -- command, and arguments. module Irc.RawIrcMsg -- | RawIrcMsg breaks down the IRC protocol into its most basic -- parts. The "trailing" parameter indicated in the IRC protocol with a -- leading colon will appear as the last parameter in the parameter list. -- -- Note that RFC 2812 specifies a maximum of 15 parameters. -- -- This parser is permissive regarding spaces. It aims to parse carefully -- constructed messages exactly and to make a best effort to recover from -- extraneous spaces. It makes no effort to validate nicknames, -- usernames, hostnames, commands, etc. Servers don't all agree on these -- things. -- --
-- :prefix COMMAND param0 param1 param2 .. paramN --data RawIrcMsg RawIrcMsg :: [TagEntry] -> Maybe UserInfo -> !Text -> [Text] -> RawIrcMsg -- | IRCv3.2 message tags [_msgTags] :: RawIrcMsg -> [TagEntry] -- | Optional sender of message [_msgPrefix] :: RawIrcMsg -> Maybe UserInfo -- | Command [_msgCommand] :: RawIrcMsg -> !Text -- | Command parameters [_msgParams] :: RawIrcMsg -> [Text] -- | Key value pair representing an IRCv3.2 message tag. The value in this -- pair has had the message tag unescape algorithm applied. data TagEntry TagEntry :: {-# UNPACK #-} !Text -> {-# UNPACK #-} !Text -> TagEntry -- | Construct a new RawIrcMsg without a time or prefix. rawIrcMsg :: Text -> [Text] -> RawIrcMsg -- | Lens for _msgTags msgTags :: Functor f => ([TagEntry] -> f [TagEntry]) -> RawIrcMsg -> f RawIrcMsg -- | Lens for _msgPrefix msgPrefix :: Functor f => (Maybe UserInfo -> f (Maybe UserInfo)) -> RawIrcMsg -> f RawIrcMsg -- | Lens for _msgCommand msgCommand :: Functor f => (Text -> f Text) -> RawIrcMsg -> f RawIrcMsg -- | Lens for _msgParams msgParams :: Functor f => ([Text] -> f [Text]) -> RawIrcMsg -> f RawIrcMsg -- | Attempt to split an IRC protocol message without its trailing newline -- information into a structured message. parseRawIrcMsg :: Text -> Maybe RawIrcMsg -- | Serialize a structured IRC protocol message back into its wire format. -- This command adds the required trailing newline. renderRawIrcMsg :: RawIrcMsg -> ByteString -- | Parse a rendered UserInfo token. prefixParser :: Parser UserInfo -- | Take the next space-delimited lexeme simpleTokenParser :: Parser Text -- | Try to decode a message as UTF-8. If that fails interpret it as -- Windows CP1252 This helps deal with clients like XChat that get clever -- and otherwise misconfigured clients. asUtf8 :: ByteString -> Text instance GHC.Show.Show Irc.RawIrcMsg.TagEntry instance GHC.Read.Read Irc.RawIrcMsg.TagEntry instance GHC.Classes.Eq Irc.RawIrcMsg.TagEntry instance GHC.Show.Show Irc.RawIrcMsg.RawIrcMsg instance GHC.Read.Read Irc.RawIrcMsg.RawIrcMsg instance GHC.Classes.Eq Irc.RawIrcMsg.RawIrcMsg -- | This module provides smart constructors for IRC commands. module Irc.Commands -- | ADMIN command -- --
-- ADMIN [<target>] --ircAdmin :: Text -> RawIrcMsg -- | AWAY command ircAway :: Text -> RawIrcMsg -- | CAP END command ircCapEnd :: RawIrcMsg -- | CAP LS command - support CAP version 3.2 ircCapLs :: RawIrcMsg -- | CAP REQ command ircCapReq :: [Text] -> RawIrcMsg -- | CHANTRACE command ircChantrace :: Text -> RawIrcMsg -- | CNOTICE command -- --
-- CNOTICE <nickname> <channel> :<message> --ircCnotice :: Text -> Text -> Text -> RawIrcMsg -- | CPRIVMSG command -- --
-- CPRIVMSG <nickname> <channel> :<message> --ircCprivmsg :: Text -> Text -> Text -> RawIrcMsg -- | ETRACE command ircEtrace :: Text -> RawIrcMsg -- | INFO command ircInfo :: RawIrcMsg -- | INVITE command ircInvite :: Text -> Identifier -> RawIrcMsg -- | ISON command ircIson :: [Text] -> RawIrcMsg -- | JOIN command ircJoin :: Text -> Maybe Text -> RawIrcMsg -- | KICK command ircKick :: Identifier -> Text -> Text -> RawIrcMsg -- | KILL command ircKill :: Text -> Text -> RawIrcMsg -- | KLINE command ircKline :: Text -> Text -> Text -> RawIrcMsg -- | KNOCK command -- --
-- KNOCK <channel> [<message>] --ircKnock :: Text -> Text -> RawIrcMsg -- | LINKS command ircLinks :: [Text] -> RawIrcMsg -- | LIST command ircList :: [Text] -> RawIrcMsg -- | LUSERS command -- --
-- LUSERS [<mask> [<server>]] --ircLusers :: [Text] -> RawIrcMsg -- | MAP command ircMap :: RawIrcMsg -- | MASKTRACE command ircMasktrace :: Text -> Text -> RawIrcMsg -- | MODE command ircMode :: Identifier -> [Text] -> RawIrcMsg ircMonitor :: [Text] -> RawIrcMsg -- | MOTD command -- --
-- MOTD [<server>] --ircMotd :: Text -> RawIrcMsg -- | NICK command ircNick :: Text -> RawIrcMsg -- | NOTICE command ircNotice :: Text -> Text -> RawIrcMsg -- | OPER command ircOper :: Text -> Text -> RawIrcMsg -- | OPERWALL command ircOperwall :: Text -> RawIrcMsg -- | PART command ircPart :: Identifier -> Text -> RawIrcMsg -- | PASS command ircPass :: Text -> RawIrcMsg -- | PING command ircPing :: [Text] -> RawIrcMsg -- | PONG command ircPong :: [Text] -> RawIrcMsg -- | PRIVMSG command ircPrivmsg :: Text -> Text -> RawIrcMsg -- | QUIT command ircQuit :: Text -> RawIrcMsg -- | REMOVE command ircRemove :: Identifier -> Text -> Text -> RawIrcMsg -- | RULES command ircRules :: Text -> RawIrcMsg -- | STATS command ircStats :: [Text] -> RawIrcMsg -- | TESTLINE command ircTestline :: Text -> RawIrcMsg -- | TESTMASK command ircTestmask :: Text -> Text -> RawIrcMsg -- | TIME command ircTime :: Text -> RawIrcMsg -- | TOPIC command ircTopic :: Identifier -> Text -> RawIrcMsg -- | TRACE command -- --
-- TRACE [<target>] --ircTrace :: [Text] -> RawIrcMsg -- | UNDLINE command ircUndline :: Text -> Maybe Text -> RawIrcMsg -- | UNKLINE command ircUnkline :: Text -> Maybe Text -> RawIrcMsg -- | UNXLINE command ircUnxline :: Text -> Maybe Text -> RawIrcMsg -- | UNRESV command ircUnresv :: Text -> Maybe Text -> RawIrcMsg -- | USER command ircUser :: Text -> Text -> RawIrcMsg -- | USERHOST command ircUserhost :: [Text] -> RawIrcMsg -- | USERIP command ircUserip :: [Text] -> RawIrcMsg -- | USERS command ircUsers :: Text -> RawIrcMsg -- | VERSION command ircVersion :: Text -> RawIrcMsg -- | WALLOPS command ircWallops :: Text -> RawIrcMsg -- | WHO command ircWho :: [Text] -> RawIrcMsg -- | WHOIS command ircWhois :: [Text] -> RawIrcMsg -- | WHOWAS command ircWhowas :: [Text] -> RawIrcMsg -- | ZNC command -- -- specific to ZNC ircZnc :: [Text] -> RawIrcMsg -- | Payload for ircAuthenticates newtype AuthenticatePayload AuthenticatePayload :: ByteString -> AuthenticatePayload ircAuthenticate :: Text -> RawIrcMsg -- | AUTHENTICATE command generator. Returns a list because AUTHENTICATE -- has a chunking behavior. ircAuthenticates :: AuthenticatePayload -> [RawIrcMsg] -- | Encoding of username and password in PLAIN authentication encodePlainAuthentication :: Text -> Text -> Text -> AuthenticatePayload -- | Encoding of username in EXTERNAL authentication encodeExternalAuthentication :: Text -> AuthenticatePayload instance GHC.Show.Show Irc.Commands.AuthenticatePayload -- | This module provides support for interpreting the modes changed by a -- MODE command. module Irc.Modes -- | Settings that describe how to interpret channel modes data ModeTypes ModeTypes :: [Char] -> [Char] -> [Char] -> [Char] -> [(Char, Char)] -> ModeTypes -- | modes for channel lists (e.g. ban) [_modesLists] :: ModeTypes -> [Char] -- | modes that always have an argument [_modesAlwaysArg] :: ModeTypes -> [Char] -- | modes that have an argument when set [_modesSetArg] :: ModeTypes -> [Char] -- | modes that never have arguments [_modesNeverArg] :: ModeTypes -> [Char] -- | modes requiring a nickname argument (mode,sigil) [_modesPrefixModes] :: ModeTypes -> [(Char, Char)] -- | Lens for _modesList modesLists :: Functor f => ([Char] -> f [Char]) -> ModeTypes -> f ModeTypes -- | Lens for _modesAlwaysArg modesAlwaysArg :: Functor f => ([Char] -> f [Char]) -> ModeTypes -> f ModeTypes -- | Lens for _modesSetArg modesSetArg :: Functor f => ([Char] -> f [Char]) -> ModeTypes -> f ModeTypes -- | Lens for _modesNeverArg modesNeverArg :: Functor f => ([Char] -> f [Char]) -> ModeTypes -> f ModeTypes -- | Lens for _modesPrefixModes modesPrefixModes :: Functor f => ([(Char, Char)] -> f [(Char, Char)]) -> ModeTypes -> f ModeTypes -- | The channel modes used by Solanum defaultModeTypes :: ModeTypes -- | The default UMODE used by Solanum defaultUmodeTypes :: ModeTypes -- | Split up a mode change command and arguments into individual changes -- given a configuration. splitModes :: ModeTypes -> Text -> [Text] -> Maybe [(Bool, Char, Text)] -- | Construct the arguments to a MODE command corresponding to the given -- mode changes. unsplitModes :: [(Bool, Char, Text)] -> [Text] instance GHC.Show.Show Irc.Modes.ModeTypes -- | This module defines high-level IRC commands. Commands are interpreted -- and their arguments are extracted into the appropriate types. module Irc.Message -- | High-level IRC message representation data IrcMsg -- | pass-through for unhandled messages UnknownMsg :: !RawIrcMsg -> IrcMsg -- | server code arguments Reply :: !Text -> !ReplyCode -> [Text] -> IrcMsg -- | old new Nick :: !Source -> !Identifier -> IrcMsg -- | user channel account account gecos Join :: !Source -> !Identifier -> !Text -> !Text -> IrcMsg -- | user channel reason Part :: !Source -> !Identifier -> Maybe Text -> IrcMsg -- | user reason Quit :: !Source -> Maybe Text -> IrcMsg -- | kicker channel kickee comment Kick :: !Source -> !Identifier -> !Identifier -> !Text -> IrcMsg -- | killer killee reason Kill :: !Source -> !Identifier -> !Text -> IrcMsg -- | user channel topic Topic :: !Source -> !Identifier -> !Text -> IrcMsg -- | source target txt Privmsg :: !Source -> !Identifier -> !Text -> IrcMsg -- | source target command txt Ctcp :: !Source -> !Identifier -> !Text -> !Text -> IrcMsg -- | source target command txt CtcpNotice :: !Source -> !Identifier -> !Text -> !Text -> IrcMsg -- | source target txt Notice :: !Source -> !Identifier -> !Text -> IrcMsg -- | source target txt Mode :: !Source -> !Identifier -> [Text] -> IrcMsg -- | parameters Authenticate :: !Text -> IrcMsg -- | cap command and parameters Cap :: !CapCmd -> IrcMsg -- | parameters Ping :: [Text] -> IrcMsg -- | parameters Pong :: [Text] -> IrcMsg -- | message Error :: !Text -> IrcMsg -- | reference-id type parameters BatchStart :: !Text -> !Text -> [Text] -> IrcMsg -- | reference-id BatchEnd :: !Text -> IrcMsg -- | user account name changed (account-notify extension) Account :: !Source -> !Text -> IrcMsg -- | Target, new username and new hostname Chghost :: !Source -> !Text -> !Text -> IrcMsg -- | Braodcast message: Source, message Wallops :: !Source -> !Text -> IrcMsg -- | sender target channel Invite :: !Source -> !Identifier -> !Identifier -> IrcMsg -- | Sub-commands of the CAP command sent by server data CapCmd -- | list of supported caps CapLs :: !CapMore -> [(Text, Maybe Text)] -> CapCmd -- | list of active caps CapList :: [Text] -> CapCmd -- | request accepted CapAck :: [Text] -> CapCmd -- | request denied CapNak :: [Text] -> CapCmd -- | new capability available (cap-notify extension) CapNew :: [(Text, Maybe Text)] -> CapCmd -- | capability removed (cap-notify extension) CapDel :: [Text] -> CapCmd data CapMore CapMore :: CapMore CapDone :: CapMore -- | Interpret a low-level RawIrcMsg as a high-level IrcMsg. -- Messages that can't be understood are wrapped in UnknownMsg. cookIrcMsg :: RawIrcMsg -> IrcMsg -- | Targets used to direct a message to a window for display data MessageTarget -- | Metadata update for a user TargetUser :: !Identifier -> MessageTarget -- | Directed message to channel or from user TargetWindow :: !Identifier -> MessageTarget -- | Network-level message TargetNetwork :: MessageTarget -- | Text representation of an IRC message to be used for matching with -- regular expressions. ircMsgText :: IrcMsg -> Text -- | Target information for the window that could be appropriate to display -- this message in. msgTarget :: Identifier -> IrcMsg -> MessageTarget -- | UserInfo of the user responsible for a message. msgActor :: IrcMsg -> Maybe Source msgSource :: RawIrcMsg -> Maybe Source -- | Split a nick into text parts group by whether or not those parts are -- valid nickname characters. nickSplit :: Text -> [Text] -- | Maximum length computation for the message part for privmsg and -- notice. Note that the need for the limit is because the server will -- limit the length of the message sent out to each client, not just the -- length of the messages it will recieve. -- -- Note that the length is on the *encoded message* which is UTF-8 The -- calculation isn't using UTF-8 on the userinfo part because I'm -- assuming that the channel name and userinfo are all ASCII -- --
-- :my!user@info PRIVMSG #channel :messagebodyrn --computeMaxMessageLength :: UserInfo -> Text -> Int capCmdText :: CapCmd -> Text data Source Source :: {-# UNPACK #-} !UserInfo -> !Text -> Source [srcUser] :: Source -> {-# UNPACK #-} !UserInfo [srcAcct] :: Source -> !Text instance GHC.Show.Show Irc.Message.Source instance GHC.Classes.Ord Irc.Message.CapMore instance GHC.Classes.Eq Irc.Message.CapMore instance GHC.Read.Read Irc.Message.CapMore instance GHC.Show.Show Irc.Message.CapMore instance GHC.Classes.Ord Irc.Message.CapCmd instance GHC.Classes.Eq Irc.Message.CapCmd instance GHC.Read.Read Irc.Message.CapCmd instance GHC.Show.Show Irc.Message.CapCmd instance GHC.Show.Show Irc.Message.IrcMsg instance GHC.Show.Show Irc.Message.MessageTarget