M(2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01 Local definition of view(c) Eric Mertens, 2016ISCemertens@gmail.comSafe2(Local definition of lens package's view.222Rate limit operations for IRC(c) Eric Mertens, 2016ISCemertens@gmail.comSafeThe O keeps track of rate limit settings as well as the current state of the limit.3Time that client can send@Construct a new rate limit with the given penalty and threshold.)Account for an event in the context of a . 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.4356penalty seconds threshold seconds 4356(Operations for interpreting mode changes(c) Eric Mertens, 2016ISCemertens@gmail.comSafe5Settings that describe how to interpret channel modes"modes for channel lists (e.g. ban)"modes that always have an argument$modes that have an argument when setmodes that never have arguments 0modes requiring a nickname argument (mode,sigil)  Lens for  _modesList  Lens for   Lens for   Lens for  Lens for  "The channel modes used by Freenode"The default UMODE used by Freenode\Split up a mode change command and arguments into individual changes given a configuration.SConstruct the arguments to a MODE command corresponding to the given mode changes. mode interpretation modes arguments (set, mode, parameter) (set,mode,parameter)     3Type and operations for nicknames and channel names(c) Eric Mertens, 2016ISCemertens@gmail.comNone .Identifier representing channels and nicknames Construct an  from a 7Returns the original 8 of an Returns the case-normalized 7 of an . which is suitable for comparison or hashing.Returns 93 when the first argument is a prefix of the second.:cCapitalize a string according to RFC 2812 Latin letters are capitalized and {|}~ are mapped to []^Hash on normalized identifier#Comparison on normalized identifier!Equality on normalized identifier;<:=;<:=User hostmasks(c) Eric Mertens, 2016ISCemertens@gmail.comNoned packages a nickname along with the username and hsotname if they are known in the current context.!nickname"username, empty when missing#hostname, empty when missing$Lens into ! field.%Render  as nick!username@hostname&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. !"#$%& !"#$%& !"#%&$ !"#$%&(Low-level representation of IRC messages(c) Eric Mertens, 2016ISCemertens@gmail.comNone*Key value pair representing an IRCv3.2 message tag. The value in this pair has had the message tag unescape algorithm applied.,, 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.8Note 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.IRCv3.2 message tags/Optional sender of message0command1command parameters2 Lens for .3 Lens for /4 Lens for 05 Lens for 16mAttempt to split an IRC protocol message without its trailing newline information into a structured message.>RFC 2812 specifies that there can only be up to 14 "middle" parameters, after that the fifteenth is the final parameter and the trailing : is optional!?Parse a whole IRC message assuming that the trailing newlines have already been removed. This parser will parse valid messages correctly but will also accept some invalid messages. Presumably the server isn't sending invalid messages!@WParse the list of parameters in a raw message. The RFC allows for up to 15 parameters.7Parse a rendered  token.8$Take the next space-delimited lexeme9xSerialize a structured IRC protocol message back into its wire format. This command adds the required trailing newline.:Construct a new , without a time or prefix.ABuild concatenate a list of parameters into a single, space- delimited bytestring. Use a colon for the last parameter if it contains a colon or a space.BQWhen the current input matches the given character parse using the given parser.CReturns 9/ iff next character in stream matches argument.;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.D Decode a 7 as CP1252EThis character encoding is a superset of ISO 8859-1 in terms of printable characters, but differs from the IANA's ISO-8859-1 by using displayable characters rather than control characters in the 80 to 9F (hex) range."*+,-./0123456>?@possible middle parameters FGHI78J9:command  parameters KLMABC;DE*+,-./0123456789:;,-./01*+:23456978;*+,-./0123456>?@FGHI78J9:KLMABC;DESmart constructors for  RawIrcMsg(c) Eric Mertens, 2016ISCemertens@gmail.comNoneBPRIVMSG commandCNOTICE commandD MODE commandE WHOIS commandF WHO commandGWHOWAS commandH NICK commandI PART commandJ JOIN commandKINVITE commandL TOPIC commandM KICK commandNREMOVE commandO QUIT commandP PASS commandQ PING commandR PONG commandS ISON commandT TIME commandUUSERHOST commandV STATS commandW LINKS commandX AWAY commandY USER commandZCAP REQ command[CAP END command\CAP LS command] ZNC commandspecific to ZNC^AUTHENTICATE command_PLAIN authentiation mode`9Encoding of username and password in PLAIN authenticationBtarget message Ctarget message D target  parameters E parameters F parameters G parameters H nickname Ichannel message Jchannel key K nickname  channel Lchannel topic M channel  nickname  message N channel  nickname  message O quit message P password Q parameters R parameters S nicknames T parameters U parameters V parameters W parameters Xmessage Y username  set +w  set +i  realname Z capabilities [\] parameters ^_` username  password BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`X[\ZKSJMWDHCIPQRBONVTLYUFEG]^_`BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`(Helpers for interpreting IRC reply codes(c) Eric Mertens, 2016ISCemertens@gmail.comNonebaLInformation describing the category and human decipherable name of a reply.ccategorydhuman-decipherable nameeCategories for reply codesf'0-99 Messages between client and serverg200-399 Responses to commandsh200-399 Errorsi UncategorizedjType of numeric reply codes$Compute information for a reply codekCategorize a reply code using the unknown category and simply showing the reply code's number as its name.DInformation about reply codes as derived from Freenode's ircd-seven.Reads only the number Shows numberabcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~jkefghi~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!      ~}|{zyxwvutsrqponmlabcdabcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)High-level representation of IRC messages(c) Eric Mertens, 2016ISCemertens@gmail.comNone)8Targets used to direct a message to a window for displayMetadata update for a user (Directed message to channel or from user Network-level message Completely hidden message Sub-commands of the CAP command request list of supported capsrequest list of active capsrequest activation of caprequest acceptedrequest deniedend negotiation%High-level IRC message representation#pass-through for unhandled messagescode argumentsold new user channeluser channel reason user reasonkicker channel kickee commentuser channel topicsource target txtsource target command txtsource target command txtsource target txt source target txt! parameters"command parameters# parameters$ parameters%message&reference-id type parameters' reference-idN0Match command text to structured cap sub-command(Interpret a low-level , as a high-level 4. Messages that can't be understood are wrapped in .OParse a CTCP encoded message: ^ACOMMAND arguments^A)XTarget information for the window that could be appropriate to display this message in.*' of the user responsible for a message.+XText representation of an IRC message to be used for matching with regular expressions.,`Split a nick into text parts group by whether or not those parts are valid nickname characters.-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 *      !"#$%&'N(O)*+P,-'     % !"#$&'()*+,-' !"#$%&'  (   +)*,-       !"#$%&'N(O)*+P,-Q      !"#$%&'(()*+,-./012233456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgghijklmnoopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./012345 67 89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY%irc-core-2.2.1-8IepMVagzBgHU8o3Xc0YCr Irc.RateLimit Irc.ModesIrc.Identifier Irc.UserInfo Irc.RawIrcMsg Irc.Commands Irc.Codes Irc.MessageView RateLimit newRateLimit tickRateLimit ModeTypes _modesLists_modesAlwaysArg _modesSetArg_modesNeverArg_modesPrefixModes modesListsmodesAlwaysArg modesSetArg modesNeverArgmodesPrefixModesdefaultModeTypesdefaultUmodeTypes splitModes unsplitModes$fShowModeTypes IdentifiermkIdidTextidDenoteidPrefix$fIsStringIdentifier$fHashableIdentifier$fOrdIdentifier$fReadIdentifier$fShowIdentifier$fEqIdentifierUserInfouserNickuserNameuserHostuiNickrenderUserInfo parseUserInfo $fEqUserInfo$fReadUserInfo$fShowUserInfoTagEntry RawIrcMsg_msgTags _msgPrefix _msgCommand _msgParamsmsgTags msgPrefix msgCommand msgParamsparseRawIrcMsg prefixParsersimpleTokenParserrenderRawIrcMsg rawIrcMsgasUtf8 $fEqTagEntry$fReadTagEntry$fShowTagEntry $fEqRawIrcMsg$fReadRawIrcMsg$fShowRawIrcMsg ircPrivmsg ircNoticeircModeircWhoisircWho ircWhowasircNickircPartircJoin ircInviteircTopicircKick ircRemoveircQuitircPassircPingircPongircIsonircTime ircUserhostircStatsircLinksircAwayircUser ircCapReq ircCapEndircCapLsircZncircAuthenticateplainAuthenticationModeencodePlainAuthentication ReplyCodeInfo replyCodeType replyCodeText ReplyTypeClientServerReply CommandReply ErrorReply UnknownReply ReplyCodeERR_NUMERIC_ERRERR_TEXTTOOSHORTERR_NOLANGUAGEERR_TOOMANYLANGUAGESERR_BADCHARENCODINGERR_SERVERMODELOCKERR_UNKNOWNSERVERMODEERR_CANNOTSENDTONICKERR_CANNOTCHANGESERVERMODEERR_CANNOTCHANGECHANMODEERR_CANNOTCHANGEUMODEERR_CANNOTDOCOMMAND RPL_SASLMECHSRPL_SASLALREADYRPL_SASLABORTEDRPL_SASLTOOLONG RPL_SASLFAILRPL_SASLSUCCESSRPL_NICKLOCKED RPL_LOGGEDOUT RPL_LOGGEDIN RPL_XINFOENDRPL_XINFOSTART RPL_XINFORPL_SCANUMODESRPL_SCANMATCHEDERR_MLOCKRESTRICTEDRPL_ENDOFRSACHALLENGE2RPL_RSACHALLENGE2ERR_MONLISTFULLRPL_ENDOFMONLIST RPL_MONLISTRPL_MONOFFLINE RPL_MONONLINERPL_ENDOFQUIETLIST RPL_QUIETLISTRPL_NOTESTLINE RPL_TESTLINE RPL_TESTMASK ERR_NOPRIVSRPL_ENDOFOMOTD RPL_OMOTDRPL_OMOTDSTART RPL_UMODEGMSGRPL_TARGNOTIFYRPL_TARGUMODEGERR_KNOCKDISABLEDERR_KNOCKONCHAN ERR_CHANOPENERR_TOOMANYKNOCK RPL_KNOCKDLVR RPL_KNOCK RPL_ETRACERPL_ETRACEFULLERR_TARGCHANGE RPL_ENDOFHELP RPL_HELPTXT RPL_HELPSTARTRPL_ENDOFMODLIST RPL_MODLISTRPL_WHOISLANGUAGERPL_WHOISSTAFF RPL_LANGUAGERPL_YOURLANGUAGEIS RPL_NETWORKSRPL_TIMEONSERVERISRPL_LUSERSTAFFRPL_CANNOTSETMODESRPL_UNKNOWNMODESRPL_WHOISSECURERPL_WHOWASDETAILSRPL_ENDOF_GENERICRPL_OTHERUMODEISRPL_SERVMODEIS RPL_CHANREDIRRPL_MODECHANGEWARNRPL_TRACEROUTE_STARTRPL_TRACEROUTE_HOP RPL_EODUMP RPL_DUMPRPL RPL_DUMPINGRPL_ENDOFSETTINGS RPL_SETTINGS RPL_ENDOFO RPL_RULES RPL_DCCINFORPL_WHOWASHOSTRPL_ENDOFDCCLIST RPL_DCCLIST RPL_DCCSTATUSRPL_ENDOFISOPER RPL_ISNOTOPER RPL_ISLOCOP RPL_ISOPERRPL_WATCHCLEARRPL_ENDOFWATCHLIST RPL_WATCHLIST RPL_NOWOFF RPL_NOWON RPL_WATCHSTAT RPL_WATCHOFF RPL_LOGOFF RPL_LOGONERR_STATSSLINEERR_USINGSLINEERR_HOSTUNAVAILERR_BADHOSTMASKERR_PFXUNROUTABLE ERR_REMOTEPFXERR_HELPNOTFOUNDERR_WHOLIMEXCEED ERR_WHOSYNTAXERR_LISTSYNTAX ERR_WHOTRUNCERR_MASKTOOWIDE ERR_OPERONLYERR_TOOMANYUSERS ERR_ADMONLY ERR_LONGMASK ERR_NOINVITE ERR_DISABLED ERR_DONTCHEAT ERR_BADEXPIRE ERR_WRONGPONGERR_TOOMANYWATCHERR_SILELISTFULLERR_USERNOTONSERVERR_GHOSTEDCLIENTERR_USERSDONTMATCHERR_UMODEUNKNOWNFLAGERR_CHANOWNPRIVNEEDEDERR_ISOPERLCHANERR_BADLOGVALUE ERR_BADLOGSYSERR_BADLOGTYPE ERR_OWNMODE ERR_NOFEATUREERR_NOSERVICEHOSTERR_NOOPERHOSTERR_VOICENEEDEDERR_TSLESSCHAN ERR_NONONREGERR_BANNEDNICKERR_ISCHANSERVICEERR_CANTKILLSERVERERR_CHANOPRIVSNEEDEDERR_NOPRIVILEGES ERR_THROTTLEERR_BADCHANNAMEERR_BANLISTFULLERR_NEEDREGGEDNICKERR_BADCHANMASKERR_BADCHANNELKEYERR_BANNEDFROMCHANERR_INVITEONLYCHANERR_UNKNOWNMODEERR_CHANNELISFULLERR_LINKCHANNEL ERR_LINKSETERR_ONLYSERVERSCANCHANGEERR_INVALIDUSERNAME ERR_KEYSETERR_YOUWILLBEBANNEDERR_YOUREBANNEDCREEPERR_PASSWDMISMATCHERR_NOPERMFORHOSTERR_ALREADYREGISTEREDERR_NEEDMOREPARAMSERR_NOTFORHALFOPS ERR_NOHIDING ERR_ACCEPTNOTERR_ACCEPTEXISTERR_ACCEPTFULLERR_HOSTILENAME ERR_NICKLOSTERR_IDCOLLISIONERR_NOTREGISTEREDERR_NOTIMPLEMENTEDERR_NONICKCHANGEERR_USERSDISABLEDERR_SUMMONDISABLED ERR_NOLOGINERR_USERONCHANNELERR_NOTONCHANNELERR_USERNOTINCHANNELERR_SERVICESDOWNERR_TARGETTOOFASTERR_NICKTOOFASTERR_UNAVAILRESOURCEERR_NICKCOLLISIONERR_BANNICKCHANGE ERR_NORULESERR_SERVICENAMEINUSEERR_NICKNAMEINUSEERR_ERRONEUSNICKNAMEERR_NONICKNAMEGIVENERR_EVENTNICKCHANGEERR_TOOMANYAWAYERR_NOOPERMOTD ERR_FILEERRORERR_NOADMININFO ERR_NOMOTDERR_UNKNOWNCOMMANDERR_LENGTHTRUNCATEDERR_TOOMANYMATCHES ERR_BADMASKERR_WILDTOPLEVELERR_NOTOPLEVELERR_NOTEXTTOSENDERR_NORECIPIENT ERR_NOORIGINERR_TOOMANYTARGETSERR_WASNOSUCHNICKERR_TOOMANYCHANNELSERR_CANNOTSENDTOCHANERR_NOSUCHCHANNELERR_NOSUCHSERVERERR_NOSUCHNICKERR_UNKNOWNERRORRPL_HOSTHIDDEN RPL_NOUSERSRPL_ENDOFUSERS RPL_USERSRPL_USERSSTARTRPL_TIMERPL_RSACHALLENGERPL_NOTOPERANYMORE RPL_MYPORTISRPL_YOURESERVICE RPL_REHASHING RPL_YOUREOPERRPL_KICKLINKED RPL_WHOISHOST RPL_ENDOFMOTD RPL_MOTDSTART RPL_ENDOFINFO RPL_INFOSTARTRPL_MOTDRPL_INFORPL_ENDOFWHOWASRPL_ENDOFBANLIST RPL_BANLISTRPL_ENDOFNAMESRPL_ENDOFLINKS RPL_LINKS RPL_CLOSEEND RPL_CLOSING RPL_KILLDONERPL_WHOWASREAL RPL_NAMREPLY_ RPL_WHOSPCRPL RPL_NAMREPLY RPL_WHOREPLY RPL_VERSIONRPL_ENDOFEXCEPTLISTRPL_EXCEPTLISTRPL_ENDOFINVEXLIST RPL_INVEXLIST RPL_INVITED RPL_SUMMONING RPL_INVITINGRPL_BADCHANPASSRPL_WHOISACTUALLYRPL_LISTSYNTAXRPL_COMMANDSYNTAX RPL_LISTUSAGERPL_TOPICWHOTIME RPL_TOPIC RPL_NOTOPICRPL_WHOISACCOUNTRPL_WHOWAS_TIMERPL_CREATIONTIMERPL_CHANNEL_URLRPL_CHPASSUNKNOWNRPL_NOCHANPASSRPL_CHANNELMLOCKISRPL_CHANNELMODEIS RPL_LISTENDRPL_LIST RPL_LISTSTARTRPL_WHOISSPECIALRPL_WHOISCHANNELSRPL_ENDOFWHOIS RPL_WHOISIDLERPL_WHOISCHANOP RPL_ENDOFWHORPL_WHOWASUSERRPL_WHOISOPERATORRPL_WHOISSERVER RPL_WHOISUSERRPL_WHOISHELPERRPL_WHOISSADMIN RPL_NICKTRACERPL_WHOISADMINRPL_NOTIFYACTION RPL_SUSERHOSTRPL_WHOISREGNICK RPL_NOWAWAY RPL_UNAWAYRPL_TEXTRPL_ISON RPL_USERHOSTRPL_AWAYRPL_NONERPL_END_CHANINFO RPL_DATASTR RPL_FEATURERPL_ENDOFJUPELISTRPL_ENDOFACCEPTRPL_ACCEPTLIST RPL_GLIST RPL_VCHANHELP RPL_VCHANLISTRPL_WHOISCERTFPRPL_STATSDELTA RPL_ENDNOTIFY RPL_NOTIFYRPL_ENDOFSILELIST RPL_SILELIST RPL_PRIVSRPL_END_NETSTAT RPL_NETSTATRPL_START_NETSTATRPL_GLOBALUSERSRPL_LOCALUSERS RPL_LOAD2HIRPL_ENDOFTRACE RPL_TRACELOGRPL_ADMINEMAIL RPL_ADMINLOC2 RPL_ADMINLOC1 RPL_ADMINME RPL_LUSERMERPL_LUSERCHANNELSRPL_LUSERUNKNOWN RPL_LUSEROPRPL_LUSERCLIENT RPL_STATSCONNRPL_STATSDEBUGRPL_STATSULINERPL_STATSXLINE RPL_STATSPINGRPL_STATSSLINERPL_STATSHLINERPL_STATSOLINERPL_STATSUPTIMERPL_STATSLLINERPL_STATSIAUTHRPL_STATSVERBOSERPL_SERVLISTEND RPL_SERVLIST RPL_SERVICERPL_ENDOFSERVICESRPL_SERVICEINFORPL_STATSCOUNTRPL_STATSZLINERPL_STATSDLINERPL_SQLINE_NICK RPL_UMODEISRPL_STATSPLINERPL_ENDOFSTATSRPL_STATSYLINERPL_STATSQLINERPL_STATSKLINERPL_STATSILINERPL_STATSNLINERPL_STATSCLINERPL_STATSCOMMANDSRPL_STATSLINKINFO RPL_STATSRPL_TRACERECONNECTRPL_TRACECLASSRPL_TRACENEWTYPERPL_TRACESERVICERPL_TRACESERVER RPL_TRACEUSERRPL_TRACEOPERATORRPL_TRACEUNKNOWNRPL_TRACEHANDSHAKERPL_TRACECONNECTING RPL_TRACELINKRPL_ATTEMPTINGREROUTERPL_ATTEMPTINGJUNC RPL_SAVENICK RPL_YOURID RPL_MAPENDRPL_MAPRPL_YOURCOOKIE RPL_REDIRRPL_STATMEMTOT RPL_SNOMASK RPL_ISUPPORT RPL_MYINFO RPL_CREATED RPL_YOURHOST RPL_WELCOME replyCodeInfodefaultReplyCodeInforeplyCodeInfoTable$fReadReplyCode$fShowReplyCode $fEqReplyCode$fOrdReplyCode $fEqReplyType$fOrdReplyType$fReadReplyType$fShowReplyType$fEqReplyCodeInfo$fOrdReplyCodeInfo$fShowReplyCodeInfo$fReadReplyCodeInfo MessageTarget TargetUser TargetWindow TargetNetwork TargetHiddenCapCmdCapLsCapListCapReqCapAckCapNakCapEndIrcMsg UnknownMsgReplyNickJoinPartQuitKickTopicPrivmsgCtcp CtcpNoticeNoticeMode AuthenticateCapPingPongError BatchStartBatchEnd cookIrcMsg msgTargetmsgActor ircMsgText nickSplitcomputeMaxMessageLength $fShowCapCmd $fEqCapCmd $fOrdCapCmd $fShowIrcMsgview rateStamp rateThreshold ratePenaltybytestring-0.10.8.1Data.ByteString.Internal ByteString#text-1.2.2.1-FeA6fTH3E2n883cNXIS2LiData.Text.InternalTextghc-prim GHC.TypesTrue ircFoldCasehashPV8WithSaltcasemapmaxMiddleParamsrawIrcMsgParser paramsParser buildParamsguarded optionalChar decodeCP1252cp1252 tagsParser tagParserunescapeTagVal escapeTagValspaces renderTags renderTag renderPrefix cookCapCmd parseCtcp isNickChar