i       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq r s t u v w x y z { | } ~   None+"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 nicknamesmA 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 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.BMessage (3rd parameter) referring to the bot sent by nick (2nd parameter) in a channel (1st parameter). The message begins with the bot's nick, followed by a colon or a comma. That part is however removed from the 3rd parameter. For example, if the message was "funbot, hello!" then the 3rd parameter will be "hello!".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).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.*,Configuration for the bot connection to IRC.,<Connection details, including nickname and optional password-List of channels to join, e.g. [" freepost", " rel4tion"].uDirectory path under which IRC log files will be placed. Relative to the bot process working directory, or absolute./Directory 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.0tFilename 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.1Minimal 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).2NFilename for the bot's main event log, i.e. produced by the IRC event source.S =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.  !"#$%&'()*+,-./012[  !"#$%&'()*+,-./012   !"#$%&'()*+,-./012None2  !"#$%&'()*+,-./0122*+,-./012$%&'() !"#  None3Add quotes to a string.4"Optionally add quotes to a string.5Format a list of labels.0putStrLn $ showNames (Just $ SingleQuotes False)", "["one", "two", "three"]'one', 'two', 'three'345"Optionally wrap labels with quotes/Separate between labels, e.g. spaces or newlineList of labels345345345None6A 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.7sTake 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.8uFind a command in a list of command sets, using the given prefix character and command name. This is a shortcut for 9a which doesn't return the matched command set (for the cases you only need to find the command).9{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.:kTake 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.;Search 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.<Format a list of command names.=9Format a list of the primary names of the given commands.6789Command prefix to search forCommand name to search forCommand set in which to search:;<+Optionally prepend the prefix char to names&Optionally add quotes around the names5Whether to separate with commas (otherwise spaces)List of command names=.Optionally prepend the prefix char to names&Optionally add quotes around the names5Whether to separate with commas (otherwise spaces)List of commands6789:;<=6789:;<=6789:;<= None >Fetch the bot configuration.?-Retrieve a function of the bot configuration.@"Fetch the bot behavior definition.A3Retrieve a function of the bot behavior definition.B0Fetch the bot environment, i.e. read-only state.C+Retrieve a function of the bot environment.$Fetch the bot session socket handle.DFetch 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.E8Fetch the current value of the state within the session.FMGet a specific component of the state, using a projection function supplied.G!Set the state within the session.HLUpdate the state to the result of applying a function to the current state.IZGet 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.>?@ABCDEFGHI>?@ABCDEFGHI>?@ABCDEFGHI NoneJ.Check whether a given channel is being logged.KMStart logging all the channels the bot has joined which aren't being logged.L=Start logging the given channel, if not being logged already.MBStart logging the channels not being logged, among the ones given.N!Stop logging all logged channels.O0Stop logging the given channel, if being logged.P<Stop logging the channels being logged among the ones given. JKLMNOPJKLMNOP JKLMNOPNoneJKLMNOPJKLMNOPNoneQQ QNoneRDisconnect 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.SBFinish the IRC session, asking the server to close the connection.T0Connect to an IRC server and run the bot sessionUnLog 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.VIRC 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 humans 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.WJoin an IRC channel.XJoin one or more IRC channels.YnJoin the IRC channels listed in the configuration, without leaving any other channels the bot already joined.ZLeave an IRC channel.[Leave one or more IRC channels.\&Leave all IRC channels the bot joined.]!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.^&Send a private message to an IRC user._sSend a message back to the sender. If a channel is specified, send to the channel. If not, send a private message.`Send 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.RS.Optional message, e.g. the reason for quittingTIRC configurationBot behavior definition(Custom bot environment (read-only state)Initial custom bot stateSession definitionUV Server nameOptional server to forward toW Channel nameOptional channel key (password)X"List of channels and optional keysYZ Channel name5Optional part message, e.g. the reason for leaving[List of channel names5Optional part message, e.g. the reason for leaving\]The channel nameThe message to send. It may contain newlines, in which case it will be split into multiple messages and sent sequentially.^The user's nicknameThe message to send. It may contain newlines, in which case it will be split into multiple messages and sent sequentially._TChannel 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.`RSTUVWXYZ[\]^_`RSTUVWXYZ[\]^_`None+Send the default response to an IRC channel(Send the default response to an IRC usera4Send message explaining a failure to an IRC channel.b1Send message explaining a failure to an IRC user.c5Send message explaining a failure back to the sender.aTarget channelUser to whom to referProblem indicationb Target userProblem indicationcOptional target channel,  means private messageTarget user nicknameProblem indicationabcabcNoneRSTUVWXYZ[\]^_`abcRSTUVWXYZ[\]^_abc`Noned/Check whether a given channel is being tracked.eXStart tracking nicks in all the channels the bot has joined which aren't being tracked.fBStart tracking nicks in the given channel, if not tracked already.gGStart tracking nicks in the channels not tracked, among the ones given.h,Stop tracking nicks in all tracked channels.i5Stop tracking nicks in the given channel, if tracked.jAStop tracking nicks in the tracked channels among the ones given.k1Check whether a nickname is present in a channel.l.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.defghijkldefghijkldefghijklNone defghijkl efghijdklNone >?@ABCDEFGHIQ >?@ADBCEFGHIQNonemCreate a logger in the  monad.n'Create a logger inside the bot session.o$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.pWrite a log message.m1Action which returns a formatted time string. YouPath of the log filenopmnopmnopNone mnop mnopNone3Handle a bot event, or log a log event into a file.&qrstuvwxyz{|}~qrstuvwxyz{|}~&qrstuvwxyz{|}~ Noneqrstuvwxyz{|}~qrstuvwxyz{|}~ NoneStart 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 2 3 4 5 6 7 8 9 : ; < < = > ? @ A B CDEFGHIJKLMN O P Q R S T U V W X Y Z [ \ ] ^ _ ` abcdefghijklmnopqrstuvwxyz{|}~                 "                ircfu_GyUTQIAYPd87vsZVmyDXWoNetwork.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_AEE5ol9YJOYCDUbvLjM2yYNetwork.IRC.Fun.Client.IOpasswordnicktlsportserver ConnectionQuotes SingleQuotes DoubleQuotes BackTicks EventHandler EventSourceLoggerBehavior handleJoin handlePart handleQuit handleMsg handleBotMsg commandSetshandlePersonalMsghandleNickChangehandleTopicChange handleNamesSession CommandSetprefixcommandsCommandnamesrespondhelpFailure WrongNumArgs WrongNumArgsN InvalidArgs InvalidArg OtherFailConfig connectionchannelslogDir stateRepo stateFile saveIntervalbotEventLogFilequote maybeQuote showNamesdefaultBehavior findCmdInSet findCmdInSetsfindCmdfindSet searchCmds listNameslistPrimaryNames askConfig askConfigS askBehavior askBehaviorSaskEnvaskEnvS askTimeGettergetState getStateSputState modifyStategetChannelStatechannelIsLoggedstartLoggingAllstartLoggingChannelstartLoggingChannelsstopLoggingAllstopLoggingChannelstopLoggingChannels saveBotState disconnectquitrunloginpong joinChannel joinMulti joinConfig partChannel partMultipartAll sendToChannel sendToUsersendBackputIrc failToChannel failToUserfailBackchannelIsTrackedstartTrackingAllstartTrackingChannelstartTrackingChannelsstopTrackingAllstopTrackingChannelstopTrackingChannels isInChannelpresence newLogger newLogger' removeLoggerlogLinematchPrefixedCommandCmatchPrefixedCommandPmatchPrefixedCommandmatchRefCommandCmatchRefCommandPmatchRefCommandmatchRefCommandFromSetCmatchRefCommandFromSetPmatchRefCommandFromSetmatchRefCommandFromNamesCmatchRefCommandFromNamesPmatchRefCommandFromNamesmatchPlainPrivateCommand matchNoticeC matchNoticeP matchNotice matchRefC matchRefPmatchRef defaultMatchrunBotghc-prim GHC.TypesIOPingKickJoinPartQuitMessageNotice BotMessage BotCommandPersonalMessage NickChange TopicChangeNames OtherEvent GHC.Classes>trans_7m6PsD4vGWRLSOXZcRxLfrControl.Monad.Trans.RWS.LazyRWST MessageSourcebaseGHC.BaseNothing loggerSet loggerGetTime EventMatcherEventBotStatetracker chanstatepublic ChannelState chanTracking chanLoggerBotEnvconfigbehaviorhandlegetTime saveStatecustomChannelUserircfu_9lskCVBTQ5D7ChM00AcBBm'Network.IRC.Fun.Messages.Internal.TypesChannelPrivacySecretPrivatePublic PrivilegeRegularVoiceOperatorJust Data.EitherLeftRight askHandlegetChansputChans modifyChans makeLoggerenabledisable BotStateJ ChannelStateJtoJfromJ loadBotStatemkSaveBotState$fToJSONBotState$fToJSONBotStateJ$fFromJSONBotStateJ$fToJSONChannelStateJ$fFromJSONChannelStateJ runSessiondefaultRespondToChandefaultRespondToUserdefaultResponsesuffixfailureDescription addMember changeNick addChannelremoveMemberOnce removeMember removeChannelremoveChannels formatLine handleEvent detectRefmkCmdmakePrefixedCommandmakeRefCommandmakeRefCommandFromSetmakeRefCommandFromNamesmakePlainCommandmakeRefCmakeRefPcombineMatchers applyMatchers matchEvent findCommand runCommandhandleBotEventdetectLogEventshandleLogEventstartBot listenToEvent listenToIrc botSession