yak-0.2.0.0: A strongly typed IRC library

Safe HaskellNone
LanguageHaskell2010

Network.Yak.Responses

Description

All response codes as types, as defined by the current Ircv3 spec https://modern.ircdocs.horse/. Please note that the argument parsing in many of these is crude and the text is parsed only as a catch-all Message type, since there may be difference between implementations on the server side, or even per network! In some places, responses have been hard-coded as defined in the Irc in order to extract necessary information. If you disagree with these choices, pull requests are welcome.

Also note that you probably want to import this module qualified, or import just what you need, as it exports 93 type synonyms and many more lenses.

In case your use case allows more precise parsing, or you need server specific response codes not listed, you can always hide the relevant types and define your own by simply building the appropriate type synonym.

  • *NOTE:** Because of size and a lack of test cases, this module is largely untested. Here be dragons!
Synopsis

Documentation

type RplWelcome = Msg "001" '[Client, Message] Source #

"<client> :Welcome to the <networkname> Network, <nick>[!<user>@<host>]"

type RplYourhost = Msg "002" '[Client, Message] Source #

"<client> :Your host is <servername>, running version <version>"

type RplCreated = Msg "003" '[Client, Message] Source #

"<client> :This server was created <datetime>"

type RplMyinfo = Msg "004" '[Client, Hostname, Text, Modes, Modes, Maybe Modes] Source #

"<client> <servername> <version> <available user modes> 
<available channel modes> [<channel modes with a parameter>]"

type RplIsupport = Msg "005" '[Client, SList Token, Message] Source #

"<client> <1-13 tokens> :are supported by this server"

type RplBounce = Msg "010" '[Client, Hostname, Int, Message] Source #

"<client> <hostname> <port> :<info>"

type RplUmodeis = Msg "221" '[Client, Modes] Source #

"<client> <user modes>"

type RplLuserclient = Msg "251" '[Client, Message] Source #

"<client> :There are <u> users and <i> invisible on <s> servers"

type RplLuserop = Msg "252" '[Client, Int, Message] Source #

"<client> <ops> :operator(s) online"

type RplLuserunknown = Msg "253" '[Client, Int, Message] Source #

"<client> <connections> :unknown connection(s)"

type RplLuserchannels = Msg "254" '[Client, Int, Message] Source #

"<client> <channels> :channels formed"

type RplLuserme = Msg "255" '[Client, Message] Source #

"<client> :I have <c> clients and <s> servers"

type RplAdminme = Msg "256" '[Client, Maybe Hostname, Message] Source #

"<client> [<server>] :Administrative info"

type RplAdminemail = Msg "259" '[Client, Message] Source #

"<client> :<info>"

type RplTryagain = Msg "263" '[Client, Text, Message] Source #

"<client> <command> :Please wait a while and try again."

type RplLocalusers = Msg "265" '[Client, Maybe (Int, Int), Message] Source #

"<client> [<u> <m>] :Current local users <u>, max <m>"

type RplGlobalusers = Msg "266" '[Client, Maybe (Int, Int), Message] Source #

"<client> [<u> <m>] :Current global users <u>, max <m>"

type RplWhoiscertfp = Msg "276" '[Client, Nickname, Message] Source #

"<client> <nick> :has client certificate fingerprint <fingerprint>"

type RplNone = Msg "300" '[Void] Source #

Undefined format

type RplAway = Msg "301" '[Client, Nickname, Message] Source #

"<client> <nick> :<message>"

type RplUserhost = Msg "302" '[Client, CList UReply] Source #

"<client> :[<reply>{ <reply>}]"

type RplIson = Msg "303" '[Client, CList Nickname] Source #

"<client> :[<nickname>{ <nickname>}]"

type RplUnaway = Msg "305" '[Client, Message] Source #

"<client> :You are no longer marked as being away"

type RplNowaway = Msg "306" '[Client, Message] Source #

"<client> :You have been marked as being away"

type RplWhoisuser = Msg "311" '[Client, Nickname, Username, Hostname, Unused "*", Message] Source #

"<client> <nick> <username> <host> * :<realname>"

type RplWhoisserver = Msg "312" '[Client, Nickname, Hostname, Message] Source #

"<client> <nick> <server> :<server info>"

type RplWhoisoperator = Msg "313" '[Client, Nickname, Message] Source #

"<client> <nick> :is an Irc operator"

type RplWhowasuser = Msg "314" '[Client, Nickname, Username, Hostname, Unused "*", Message] Source #

"<client> <nick> <username> <host> * :<realname>"

type RplWhoisidle = Msg "317" '[Client, Nickname, Int, Maybe POSIXTime, Message] Source #

"<client> <nick> <secs> [<signon>] :seconds idle, signon time"

type RplEndofwhois = Msg "318" '[Client, Nickname, Message] Source #

"<client> <nick> :End of /Whois list"

type RplWhoischannels = Msg "319" '[Client, Nickname, CList (Member Channel)] Source #

"<client> <nick> :[prefix]<channel>{ [prefix]<channel>}"

type RplListstart = Msg "321" '[Client] Source #

"<client> Channel :Users  Name"

type RplList = Msg "322" '[Client, Channel, Int, Message] Source #

"<client> <channel> <visible clients> :<topic>"

type RplListend = Msg "323" '[Client, Message] Source #

"<client> :End of /List"

type RplChannelmodeis = Msg "324" '[Client, Channel, ByteString] Source #

"<client> <channel> <modestring> <mode arguments>..."

type RplNotopic = Msg "331" '[Client, Channel, Message] Source #

"<client> <channel> :No topic is set"

type RplTopic = Msg "332" '[Client, Channel, Message] Source #

"<client> <channel> :<topic>"

type RplTopictime = Msg "333" '[Client, Channel, Nickname, POSIXTime] Source #

"<client> <channel> <nick> <setat>"

type RplInviting = Msg "341" '[Client, Channel, Nickname] Source #

"<client> <channel> <nick>"

type RplInvitelist = Msg "346" '[Client, Channel, Mask] Source #

"<client> <channel> <mask>"

type RplEndofinvitelist = Msg "349" '[Client, Channel, Message] Source #

"<client> <channel> :End of channel invite list"

type RplExceptlist = Msg "348" '[Client, Channel, Mask] Source #

"<client> <channel> <mask>"

type RplEndofexceptlist = Msg "349" '[Client, Channel, Message] Source #

"<client> <channel> :End of channel exception list"

type RplVersion = Msg "351" '[Client, Text, Hostname, Message] Source #

"<client> <version> <server> :<comments>"

type RplNamreply = Msg "353" '[Client, Char, Channel, CList (Member Nickname)] Source #

"<client> <symbol> <channel> :[prefix]<nick>{ [prefix]<nick>}"

type RplEndofnames = Msg "366" '[Client, Channel, Message] Source #

"<client> <channel> :End of /Names list"

type RplBanlist = Msg "367" '[Client, Channel, Mask] Source #

"<client> <channel> <mask>"

type RplEndofbanlist = Msg "368" '[Client, Channel, Message] Source #

"<client> <channel> :End of channel ban list"

type RplEndofwhowas = Msg "369" '[Client, Nickname, Message] Source #

"<client> <nick> :End of Whowas"

type RplMotdstart = Msg "375" '[Client, Unused ":-", Hostname] Source #

"<client> :- <server> Message of the day - "

type RplMotd = Msg "372" '[Client, Message] Source #

"<client> :<line of the motd>"

type RplEndofmotd = Msg "376" '[Client, Message] Source #

"<client> :End of /Motd command."

type RplYoureoper = Msg "381" '[Client, Message] Source #

"<client> :You are now an Irc operator"

type RplRehashing = Msg "382" '[Client, Text, Message] Source #

"<client> <config file> :Rehashing"

type ErrUnknownerror = Msg "400" '[Client, SList Text, Message] Source #

"<client> <command>{ <subcommand>} :<info>"

type ErrNosuchnick = Msg "401" '[Client, Nickname, Message] Source #

"<client> <nickname> :No such nick/channel"

type ErrNosuchserver = Msg "402" '[Client, Hostname, Message] Source #

"<client> <server name> :No such server"

type ErrNosuchchannel = Msg "403" '[Client, Channel, Message] Source #

"<client> <channel> :No such channel"

type ErrCannotsendtochan = Msg "404" '[Client, Channel, Message] Source #

"<client> <channel> :Cannot send to channel"

type ErrToomanychannels = Msg "405" '[Client, Channel, Message] Source #

"<client> <channel> :You have joined too many channels"

type ErrUnknowncommand = Msg "421" '[Client, Text, Message] Source #

"<client> <command> :Unknown command"

type ErrNomotd = Msg "422" '[Client, Message] Source #

"<client> :Motd File is missing"

type ErrErroneusnickname = Msg "432" '[Client, Nickname, Message] Source #

"<client> <nick> :Erroneus nickname"

type ErrNicknameinuse = Msg "433" '[Client, Nickname, Message] Source #

"<client> <nick> :Nickname is already in use"

type ErrNotregistered = Msg "451" '[Client, Message] Source #

"<client> :You have not registered"

type ErrNeedmoreparams = Msg "461" '[Client, Text, Message] Source #

"<client> <command> :Not enough parameters"

type ErrAlreadyregistered = Msg "462" '[Client, Message] Source #

"<client> :You may not reregister"

type ErrPasswdmismatch = Msg "464" '[Client, Message] Source #

"<client> :Password incorrect"

type ErrYourebannedcreep = Msg "465" '[Client, Message] Source #

"<client> :You are banned from this server."

type ErrChannelisfull = Msg "471" '[Client, Channel, Message] Source #

"<client> <channel> :Cannot join channel (+l)"

type ErrUnknownmode = Msg "472" '[Client, Char, Message] Source #

"<client> <modechar> :is unknown mode char to me"

type ErrInviteonlychan = Msg "473" '[Client, Channel, Message] Source #

"<client> <channel> :Cannot join channel (+i)"

type ErrBannedfromchan = Msg "474" '[Client, Channel, Message] Source #

"<client> <channel> :Cannot join channel (+b)"

type ErrBadchannelkey = Msg "475" '[Client, Channel, Message] Source #

"<client> <channel> :Cannot join channel (+k)"

type ErrNoprivileges = Msg "481" '[Client, Message] Source #

"<client> :Permission Denied- You're not an Irc operator"

type ErrChanoprivsneeded = Msg "482" '[Client, Channel, Message] Source #

"<client> <channel> :You're not channel operator"

type ErrCantkillserver = Msg "483" '[Client, Message] Source #

"<client> :You cant kill a server!"

type ErrNooperhost = Msg "491" '[Client, Message] Source #

"<client> :No O-lines for your host"

type ErrUmodeunknownflag = Msg "501" '[Client, Message] Source #

"<client> :Unknown Mode flag"

type ErrUsersdontmatch = Msg "502" '[Client, Message] Source #

"<client> :Cant change mode for other users"

type RplStarttls = Msg "670" '[Client, Message] Source #

"<client> :Starttls successful, proceed with Tls handshake"

type ErrStarttls = Msg "691" '[Client, Message] Source #

"<client> :Starttls failed (Wrong moon phase)"

type ErrNoprivs = Msg "723" '[Client, Text, Message] Source #

"<client> <priv> :Insufficient oper privileges."

type RplLoggedin = Msg "900" '[Client, Host, Text, Message] Source #

"<client> <nick>!<user>@<host> <account> 
:You are now logged in as <username>"

type RplLoggedout = Msg "901" '[Client, Host, Message] Source #

"<client> <nick>!<user>@<host> :You are now logged out"

type ErrNicklocked = Msg "902" '[Client, Message] Source #

"<client> :You must use a nick assigned to you"

type RplSaslsuccess = Msg "903" '[Client, Message] Source #

"<client> :Sasl authentication successful"

type ErrSaslfail = Msg "904" '[Client, Message] Source #

"<client> :Sasl authentication failed"

type ErrSasltoolong = Msg "905" '[Client, Message] Source #

"<client> :Sasl message too long"

type ErrSaslaborted = Msg "906" '[Client, Message] Source #

"<client> :Sasl authentication aborted"

type ErrSaslalready = Msg "907" '[Client, Message] Source #

"<client> :You have already authenticated using Sasl"

type RplSaslmechs = Msg "908" '[Client, [Text], Message] Source #

"<client> <mechanisms> :are available Sasl mechanisms"