>0Y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  None2"Quote types for string formatting.}Single quote on each side of the formatted string. The parameter sets whether to use Unicode (otherwise use ASCII fallback). }Double quote on each side of the formatted string. The parameter sets whether to use Unicode (otherwise use ASCII fallback). .Backtick on each side of the formatted string. HA bot session action which reacts to a single event which came from an  .Type parameters:e - custom bot environment types - custom bot state typea - event type An  action, possibly running forever, which produces events for the bot to process. These event sources are run by the bot in dedicated threads.Type parameters:e - custom bot environment types - custom bot state typea - event typeBot behavior definition.2Handle a channel member list received. Parameters:  Channel nameChannel privacyVList of channel members: their privilege level in the channel and their nicknamesWhere an event matcher applies.-Tries to match a client event to a bot event.mA ping was sent to the bot. The parameters contain the arguments passed, which should be passed in the Pong.jUsers (2nd parameter) have been kicked from a channel (1st parameter) for a given reason (3rd parameter).8A user (2nd parameter) joined a channel (1st parameter).BA user (2nd parameter) left a channel (1st parameter), 3rd=reason. User, reason.Message (3rd parameter) sent in a channel (1st parameter) by a user with the given nickname (2nd parameter). The last parameter says whether the bot's nick is mentioned in the message.Like !, but it's a pseudo action (/me).Like , but this is a notice. The bot shouldn't send a response (but it can modify its state etc.). First parameter: Just channel, or Nothing. The latter means a private message.4Message referring to the bot sent in a channel. The message begins with the bot's nick, followed by a colon or a comma. For example, if the message was "funbot, hello!" then the 3rd parameter will be "hello!". The parameters are: Channel, nickname, stripped message, full message including the reference.A bot command, which is a message with a special prefix, was sent to a channel or privately to the bot. Parameters: Source, prefix character, command name, command arguments.A private message sent specifically to the bot, from a user with the given nickname (1st parameter) and with the given content (2nd parameter).Like !, but it's a pseudo action (/me).Old nick, new nick.Channel, nickname, topicThe server sent a list of nicknames present in a channel. Parameters: Channel privacy mode, channel name, list of users. Each list item is a pair of a user privilege level in the channel, and the user's nickname.TUnrecognized or unimplemented event. The parameter contains (possibly empty) input. Bot monad. It provides read-only bot environment (e.g. the configuration), read-writable bot state (for use by bot commands) and IO.!The bot recognizes commands by picking IRC channel messages which begin with a special character, the command prefix. It's possible to have several prefixes, maybe give each its own role or meaning. A command set is a set of commands which share a prefix.&A command can be in more than one set.Common prefixes are !, \@, , :.%QA bot command, triggered by a message sent to an IRC channel the bot has joined.The type parameter eG is the type of environment, i.e. real-only state. The type parameter s is the type of the writable state the bot holds. For example, maybe you want your bot to keep a list of to-do items and manage it using bot commands. The bot state is where you store the to-do list.' The command's name string, e.g. "echo"k. More than one name is allowed per command, so that localized names and shortcuts can be made available.-The first name in the list is considered the  primary nameN. When one name is shown, e.g. in help messages, it will be the primary name.(What to do in response to the command being triggered by an IRC user. The bot can send an IRC message back to the channel, or modify its state, or both.The returned value is in the   monad (it is really  behind the scenes), which allows the bot to access the configuration and bot state, store and load data from files, communicate through the network (e.g. download RSS feeds) and more. Parameters: 2Channel in which the command was triggered, if any*Nickname of user who triggered the commandCommand parameters givenDAction for sending a message back to the sender, same as using sendBack with the channel and nickname)Help string for the command, explaining it purpose, its parameters and its usage, possibly giving an example. May contain newlines.*'Describes wrong usage of a bot command.+&The number of arguments given is wrong,=<first-param> arguments were given, instead of <second-param>-(At least one of the arguments is invalid.DArgument in position <first-param> and value <second-param> invalid/*Some other error, with a given descriptionIA message for the bot can come privately or in a channel by a given user.0,Configuration for the bot connection to IRC.2<Connection details, including nickname and optional password38The list of channels for the bot to join is generally set in the state file, but when the bot launches it joins both the channels listed there and the ones listed here. This list is intended to be used as hard-coded backup, i.e. the bot will always join these channels regardless of what the state file says.4uDirectory path under which IRC log files will be placed. Relative to the bot process working directory, or absolute.5Directory path for the state file. This enables Git commits of the state file. A relative (to the bot process working dir) or absolute path to the Git repository. You must create the directory yourself if it doesn't exist, but repo will be auto-created for you if needed.6tFilename into the bot state managed by this library will be stored. The custom part of the state isn't handled. If stateDir is n, this is a path relative to the bot process working directory, or absolute. Otherwise, it's relative to the stateDir.7Minimal time interval between state saves. For example, to say "don't write state to file more than once per three seconds", set this field to 3 seconds, i.e. time (3 :: Second).8NFilename for the bot's main event log, i.e. produced by the IRC event source.9sMaximal number of characters in a message the bot can send to a user or a channel. Longer messages will be split. Y means no limit, i.e. let the IRC server truncate long messages. This limit applies to  sendToUser and  sendToChannelY and all the functions which use them. A safe default if you want to set a limit is 400.:VTime interval for sending PINGs to the server, to make sure the connection is alive.  means no PINGs sent.;.Maximal lag time allowed before the bot quits.e =The bot configuration. The event source may find this useful.DThe bot's custom environment. The event source may find this useful.A non-blocking ; action which sends a given event to the processing queue.A non-blocking D action which sends a given list of events to the processing queue.An  action which creates a logger with a given target filename. An event source can use it to log events, errors, debug into, etc. into files efficiently.  !"#$%&'()*+,-./0123456789:;m  !"#$%&'()*+,-./0123456789:;    !"#$%&'()*+,-./0 123456789:;None;  !"#$%&'()*+,-./0123456789:;;0123456789:;*+,-./%&'()!"#$   None<Add quotes to a string.="Optionally add quotes to a string.>Format a list of labels.0putStrLn $ showNames (Just $ SingleQuotes False)", "["one", "two", "three"]'one', 'two', 'three'<=>"Optionally wrap labels with quotes/Separate between labels, e.g. spaces or newlineList of labels<=><=><=>None?A default behavior definition which be convenienty overridden and extended using record syntax. It currently simply doesn't do anything (pings do get handled behind the scenes), but things like default responses and logging could be added in the future.@sTake a command name (without prefix) and a command set, and return the (leftmost) command which has that name, or  if there is no such command.AuFind a command in a list of command sets, using the given prefix character and command name. This is a shortcut for Ba which doesn't return the matched command set (for the cases you only need to find the command).B{Find a command in a list of command sets, using the given prefix character and command name. If the prefix isn't matched, ? is returned. If the prefix is matched but the command isn't,  * the command set is returned. Otherwise,  ! the matched command is returned.CkTake a command prefix and a list of command sets, and return the (leftmost) set which has that prefex, or  if there is no such set.DSearch for commands by testing a search string against their textual fields: Names and help strings. Each returned pair is a command and the prefix under which it was found.EFormat a list of command names.F9Format a list of the primary names of the given commands.?@ABCommand prefix to search forCommand name to search forCommand set in which to searchCDE+Optionally prepend the prefix char to names&Optionally add quotes around the names5Whether to separate with commas (otherwise spaces)List of command namesF.Optionally prepend the prefix char to names&Optionally add quotes around the names5Whether to separate with commas (otherwise spaces)List of commands?@ABCDEF?@ABCDEF?@ABCDEF NoneGFetch the bot configuration.H-Retrieve a function of the bot configuration.I"Fetch the bot behavior definition.J3Retrieve a function of the bot behavior definition.K0Fetch the bot environment, i.e. read-only state.L+Retrieve a function of the bot environment.$Fetch the bot session socket handle.MFetch the time getter. The actual time data is cached and updated at most once per second depending on need. You can safely use it at any frequency withou overloading IO and time formatting.8The second item is a formatted time string in the form 2015-09-01 18:10:00!, and is always expressed in UTC.N8Fetch the current value of the state within the session.OMGet a specific component of the state, using a projection function supplied.P!Set the state within the session.QLUpdate the state to the result of applying a function to the current state.RZGet channel state information, in the form of a mapping from channel names to their data.Channel data is a pair of two booleans. The first says whether channel tracking is enabled. The second says whether channel logging info a file is enabled.SCCheck whether a channel is listed in persistent state to be joined.TCheck whether, as far as the bot knows, if it currently a member of the given channel. Currently kicks, bans, etc. are fully tracked, therefore this information isn't 100% accurate, but if you aren't planning to ban your bot you can probably rely on it.GHIJKLMNOPQRSTGHIJKLMNOPQRSTGHIJKLMNOPQRST NoneU.Check whether a given channel is being logged.VMStart logging all the channels the bot has joined which aren't being logged.W=Start logging the given channel, if not being logged already.XBStart logging the channels not being logged, among the ones given.Y!Stop logging all logged channels.Z0Stop logging the given channel, if being logged.[<Stop logging the channels being logged among the ones given. UVWXYZ[UVWXYZ[ UVWXYZ[NoneUVWXYZ[UVWXYZ[None]eAdd a channel to the persistent list of channels to be joined. Next time the bot launches (or, say,  joinConfig[ is called), it will join this channel. If the channel is already listed, nothing happens.^Remove a channel from the persistent list of channels to be joined. Next time the bot launches, it won't join this channel (unless listed in the config or otherwise requested). If the channel isn't listed, nothing happens._Add default channel state for the given channel. It will be stored into the state file. If the channel already has state, nothing will happen.\]^_\]^_\]^_None`Disconnect from IRC by closing the bot's side of the connection. This function is mainly provided for completeness and cases of error. You should probably use the QUIT command of IRC to quit the network in a manner coordinated with the server.=After disconnection, make sure not to send more IRC commands.aBFinish the IRC session, asking the server to close the connection.b0Connect to an IRC server and run the bot sessioncnLog in as an IRC user and identify with the bot's nickname and password. This is the first thing to do after  botConnecting to the server.dIRC servers send PING messages at regular intervals to test the presence of an active client, at least if no other activity is detected on the connection. The server closes the connection automatically if a PONG response isn't sent from the client within a certain amount of time.Therefore, an IRC client (both human users and bots) usually listens to these PINGs and sends back PONG messages. This function sends a PONG. The parameters should simply be the ones received in the PING message.eJoin an IRC channel.fJoin one or more IRC channels.gJoin the IRC channels listed for joining in the persistent state and in the configuration, without leaving any other channels the bot already joined.hLeave an IRC channel.iLeave one or more IRC channels.j&Leave all IRC channels the bot joined.k!Send a message to an IRC channel.This usually requires that the bot joins the channel first, because many channels have the +n flag set. This flag forbids sending a messages into a channel from outside it.l&Send a private message to an IRC user.msSend a message back to the sender. If a channel is specified, send to the channel. If not, send a private message.nSend an IRC message to the server. This should only be used if the other wrappers don't provide what you need. If that's the case, it may be a good idea for reusability to add a new wrapper.`a.Optional message, e.g. the reason for quittingbIRC configurationBot behavior definition(Custom bot environment (read-only state)Initial custom bot stateSession definitioncd Server nameOptional server to forward toe Channel nameOptional channel key (password)f"List of channels and optional keysgh Channel name5Optional part message, e.g. the reason for leavingiList of channel names5Optional part message, e.g. the reason for leavingjkThe channel nameThe message to send. It may contain newlines, in which case it will be split into multiple messages and sent sequentially.lThe user's nicknameThe message to send. It may contain newlines, in which case it will be split into multiple messages and sent sequentially.mTChannel name, specify if replying to a message sent in a channel. Otherwise pass .The sender user's nicknameThe message to send. It may contain newlines, in which case it will be split into multiple messages and sent sequentially.n`abcdefghijklmn`abcdefghijklmnNone+Send the default response to an IRC channel(Send the default response to an IRC usero4Send message explaining a failure to an IRC channel.p1Send message explaining a failure to an IRC user.q5Send message explaining a failure back to the sender.oTarget channelUser to whom to referProblem indicationp Target userProblem indicationqOptional target channel,  means private messageTarget user nicknameProblem indicationopqopqNone`abcdefghijklmnopq`abcdefghijklmopqnNoner/Check whether a given channel is being tracked.sXStart tracking nicks in all the channels the bot has joined which aren't being tracked.tBStart tracking nicks in the given channel, if not tracked already.uGStart tracking nicks in the channels not tracked, among the ones given.v,Stop tracking nicks in all tracked channels.w5Stop tracking nicks in the given channel, if tracked.xAStop tracking nicks in the tracked channels among the ones given.y1Check whether a nickname is present in a channel.z.Check in which channels a nickname is present.-Record a nickname being present in a channel.yRecord a nickname change. Remove old nickname from the channels in which it's present, and add the new nickname to them.2Record a channel with the given present nicknames.5Record a channel not having a given nickname anymore.;Record a nickname not being present in any channel anymore."Remove a channel from the records.!Remove channels from the records.rstuvwxyzrstuvwxyzrstuvwxyzNone rstuvwxyz stuvwxryzNoneGHIJKLMNOPQRST\]^_GHIJMKLNOPQR]^ST_\None{Create a logger in the  monad.|'Create a logger inside the bot session.}$Flush buffers and release resources.When the logger is paused for a long period of time (i.e. not momentarily - e.g. by a user disabling channel logging via UI), you can use this to release resources. Later, when logging is needed again, create a fresh new logger.~Write a log message.{1Action which returns a formatted time string. YouPath of the log file|}~{|}~{|}~None {|}~ {|}~None3Handle a bot event, or log a log event into a file.)      )      None NoneA default bot configuration. You can use it with record syntax to override just the fields you need. It also allows your code to remain valid when a new config option is added, since you won't be using the 0 constructor directy.In the future the constructor may be removed, and then this function will be the only way to create a configuration. It allows adding a field without incrementing the library's major version and breaking compatibility.Start the bot and run its event loop. The bot will listen to messages from the IRC server and other provided sources, and will respond according to the behavior definitions. IRC connection configuration&Event detection (high-to-low priority)"Behavior definition for IRC events&Additional event source threads to run,Handler for events coming from those sources(Custom bot environment (read-only state)'Initial state to hold in the backgroundDInitialization action to run at the very beginning of the session       ! " # # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 5 6 7 8 8 9 : ; < = > ? @ A B B C D E F G H I J K LMNOPQRSTUVW X Y Z [ \ ] ^ _ ` a b c d e f g h i j k lmnopqrstuvwxyz{|}~                         "                !"#$ % & ' ( ) * +,ircfu_6qKe0QgaprJ80b6ly0o0KLNetwork.IRC.Fun.Bot.TypesNetwork.IRC.Fun.Bot.LoggerNetwork.IRC.Fun.Bot.UtilNetwork.IRC.Fun.Bot.BehaviorNetwork.IRC.Fun.Bot.StateNetwork.IRC.Fun.Bot.IrcLogNetwork.IRC.Fun.Bot.ChatNetwork.IRC.Fun.Bot.NicksNetwork.IRC.Fun.Bot.EventMatchNetwork.IRC.Fun.Bot"Network.IRC.Fun.Bot.Internal.Types"Network.IRC.Fun.Bot.Internal.State#Network.IRC.Fun.Bot.Internal.IrcLog$Network.IRC.Fun.Bot.Internal.Persist!Network.IRC.Fun.Bot.Internal.Chat$Network.IRC.Fun.Bot.Internal.Failure"Network.IRC.Fun.Bot.Internal.Nicks#Network.IRC.Fun.Bot.Internal.Logger"Network.IRC.Fun.Bot.Internal.Eventircfu_EQFhiYDNSGzISYUTcMyfxlNetwork.IRC.Fun.Client.IOpasswordnicktlsportserver ConnectionQuotes SingleQuotes DoubleQuotes BackTicks EventHandler EventSourceLoggerBehavior handleJoin handlePart handleQuit handleMsg handleAction handleBotMsg commandSetshandlePersonalMsghandlePersonalActionhandleNickChangehandleTopicChange handleNamesEventMatchSpaceMatchInChannelMatchInPrivate MatchInBothSession CommandSet csetPrefix csetCommandsCommandcmdNames cmdRespondcmdHelpFailure WrongNumArgs WrongNumArgsN InvalidArgs InvalidArg OtherFailConfig connectionchannelslogDir stateRepo stateFile saveIntervalbotEventLogFile maxMsgCharslagChecklagMaxquote maybeQuote showNamesdefaultBehavior findCmdInSet findCmdInSetsfindCmdfindSet searchCmds listNameslistPrimaryNames askConfig askConfigS askBehavior askBehaviorSaskEnvaskEnvS askTimeGettergetState getStateSputState modifyStategetChannelStatechannelSelected botMemberOfchannelIsLoggedstartLoggingAllstartLoggingChannelstartLoggingChannelsstopLoggingAllstopLoggingChannelstopLoggingChannels saveBotState selectChannelunselectChanneladdChannelState disconnectquitrunloginpong joinChannel joinMulti joinConfig partChannel partMultipartAll sendToChannel sendToUsersendBackputIrc failToChannel failToUserfailBackchannelIsTrackedstartTrackingAllstartTrackingChannelstartTrackingChannelsstopTrackingAllstopTrackingChannelstopTrackingChannels isInChannelpresence newLogger newLogger' removeLoggerlogLinemodId modPrefix modPrefixes modPrefixCI modPrefixesCImodPleasePrefixmodPleasePrefix'matchPrefixedCommandmatchPrefixedCommandFromSetmatchPrefixedCommandFromNamesmatchRefCommandmatchRefCommandFromSetmatchRefCommandFromNamesmatchPlainPrivateCommand matchNoticematchRef defaultMatch defConfigrunBotghc-prim GHC.TypesIO EventMatcherPingKickJoinPartQuitMessageActionNotice BotMessage BotCommandPersonalMessagePersonalAction NickChange TopicChangeNames OtherEvent GHC.Classes>trans_7m6PsD4vGWRLSOXZcRxLfrControl.Monad.Trans.RWS.LazyRWST MessageSourcebaseGHC.BaseNothingMsg MsgLogEvent MsgBotEvent MsgExtEventMsgQuit loggerSet loggerGetTimeEventBotState bsTracker bsChannels bsCurrChans bsSelChansbsPublic ChannelState chanTracking chanLoggerBotEnvbeConfig beBehaviorbeHandle beGetTime beSaveStatebeCustomChannelUserircfu_23DbhnLa7Xg5Vula79wL1R'Network.IRC.Fun.Messages.Internal.TypesChannelPrivacySecretPrivatePublic PrivilegeRegularVoiceOperatorJust Data.EitherLeftRight askHandlegetChansputChans modifyChans addCurrChanremoveCurrChanclearCurrChans makeLoggerenabledisable BotStateJ ChannelStateJtoJfromJ loadBotStatemkSaveBotState$fToJSONBotState$fToJSONBotStateJ$fFromJSONBotStateJ$fToJSONChannelStateJ$fFromJSONChannelStateJ runSessionsplitN makeLinesdefaultRespondToChandefaultRespondToUserdefaultResponsesuffixfailureDescription addMember changeNick addChannelremoveMemberOnce removeMember removeChannelremoveChannels formatLine handleEvent stripPrefixCI detectRefmkCmdexpandmakePrefixedCommandmakePrefixedCommandFromSetmakePrefixedCommandFromNamesmakeRefCommandmakeRefCommandFromSetmakeRefCommandFromNamesmakePlainCommandmakeRefCmakeRefPifPrivifChancombineMatchers applyMatchers matchEvent findCommand runCommandhandleBotEventdetectLogEventshandleLogEventstartBot listenToEventgetNow listenToIrcintervalToSpec manageLag botSession