V      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-InferedZ Away status Last time when user talked  Nickname  Host name, user@host e.g. @ or +  Real name #If user belongs to the focused tab $Networks to which this nick applies  Nickname Currently on-line Time when nick came online Time when nick went offline Time when nick was last seen Ignore mask. .e.g: *!*@ *.aol.com Flags !5ipv4 address of remote user (dunno how to have ipv6) "Bytes per seconds #Destination full pathname $ File name %+Nickname of the person who the file is from/ to (Receive/ Send mode) &TCP port number ' Bytes send/-received up to now for the current transfert (;Offset of file from which it is resumed (0 if not resumed) )File size in bytes *Status of the DCC transfert +Type of the DCC transfert :Channel or query name ;Channel type e.g. "#!&" <Context of the channel =Server/ Channel bits >Unique server ID ?Lag in milliseconds @Maximum modes per line ANetwork name of the channel BNickname prefixes e.g. "@+" CNickname mod chars e.g. "ov" DNumber of bytes in send-queue EServer name of the channel FType of context GNumber of users in the channel NAlready connected OConnecting in progress P You are away QLogin complete RHas WHOX (ircu) SHas IDMSG (FreeNode) T Hide Join/Part messages * unused flag not figuring in the ChanFlgs UBeep on message V Blink tray WBlink task bar Xflags on how to strip rules \flags for file descriptors b5an abstract type to define the priority of a command c4a concrete type to define the priority of a command d#Custom, is normalized when cast to  b eLowest priority (-128) fLow priority (-64) gNormal priority (0) hHigh priority (64) iHighest priority (127) j,The returned type of all hooking functions;  if f is a j a b c d hooking function, then:    f ph cb init means that a new o a b c hook  using the callback cb function is  created for the ph plugin; the hooking modifies  the a plugin memory according to init,  and returns the b returned by init as well as the  created hook. <The callback function itself is a function which takes some  d data, the a& plugin memory at the moment when the ? callback function is called and returns how the event which ; triggered the callback call is eaten as well as the new  a plugin memory. kHThe way callbacks are managed; a callback function can be eat an event, > that is make the event unprocessable, either to XChat or  to the other plgins. o0The type of hooks; it has three type arguments. , The first is the type of the plugin memory 7 The second one is the type returned at hook creation, > it can be used to restore the memory at unhooking time, . or to print some debugging information. 7 The third one is the type returned at unhooking time, 7 it can be used to display debugging information. p2The type of plugins; it is associated to a memory = which can be used and modified by the hooked callbacks. $All the following functions needs a p as D argument. In fact it is a handle which needs to be initialized  by the init, function, and will be freed by an optional deinit  function. rthe type of contexts s The result of a setting request xThe plugin descriptor }:The plugin initializer. NEVER call it, it is only used by hsxchat. ~<to get a (normalized) abstract priority from a concrete one 0to get a concrete priority from an abstract one    cmd pri help  Description: Hooking to the /cmd input box command at priority pri with an  optional help message. To capture text without a '/' at the start (non-commands), you may hook a special name of "" as in:   let eatAll = k { m = , n =  }  startWithYou s a =  p ("you: "s)   (eatAll, a) in  "" g  p startWithYou () which automatically adds "you: ", at the beginning of each sentence you type 5(and is undocumented as the help message argument is ). *Commands hooked that begin with a period ('.') will be hidden in /HELP and /HELP -l.  Arguments:  cmd< The command (without the forward slash) with some special G treatment if it is the empty string or if it begins with a dot pri0 Priority of the hook, you should probably use g help& Optionnal help message, displayed at /HELP cmd command  Callback Function Main Argument: KThe callback function expects a string containing all the arguments passed to the command.  Description:    ev pri Hooking to the server event ev at priority pri. "To capture all server events, use "RAW LINE".  Arguments:  ev# The server event to be captured pri0 Priority of the hook, you should probably use g  Callback Function Main Argument: GThe callback function expects a string containing all the arguments of the captured server event.  Description:    prev pri Hooking to the print event prev at priority pri. Available events are those in "Advanced > Text Events" plus these ones:  " Open Context" Called when a new r is created. " Close Context"0 Called when a xchat_context pointer is closed. " Focus Tab"( Called when a tab is brought to front. " Focus Window"& Called a toplevel window is focused, O or the main tab-window is focused by the window manager. " DCC Chat Text"0 Called when some text from a DCC Chat arrives. N It provides these arguments for the callback function:  $[_, Address, Port, Nick, The Message] " Key Press"5 Called when some keys are pressed in the input-box. J It provides these arguments for the callback function:  6[_, Key Value, State Bitfield (shift, capslock, alt), E String version of the key, Length of the string 4 (may be 0 for unprintable keys)]  Arguments:  prev The print event to be captured pri0 Priority of the hook, you should probably use g  Callback Function Main Argument: PThe callback function expects a list of strings containing all the arguments of the captured print event.  Description:   xChatHookTimeout timeout !Hooking to call a function every timeout milliseconds.  Arguments:  timeoutB The time(ms) to wait before the next triggering of the callback.  Callback Function Main Argument: 0The callback function expects just a unit type.  Description:    fd flgs Hooking to the file descriptor fd with flags flgs. LThe callback function is called every time the file descriptor is available %to an action described by the flags.  Arguments:  fd The file descriptor or socket flgs" The flags of the file descriptor  Callback Function Main Argument: HThe callback function expects a file descriptor and a flag (that may be removed in a newer version).  Description:    ph hook restore Unhooking of the given hook. -According to the xchat plugin documentation, 0hooks are automatically removed at deinit time. 3But you may wish for some reason to hook or unhook dynamically some function. 3There is an argument that allows you to modify the ;memory at unhook time. For example, if you have a counter, your memory could be a  . When you hook, you may want  to put it  0' and when you unhook to put it back to .  Arguments: ph/ The plugin handle of which we want to unhook. hook% The hook to remove from the plugin. restore8 The function to be called on the memory of the plugin.  Description:    ph text (Displays some text in the xchat window.  Arguments: ph/ The plugin handle which manages the printing. text4 The text to display. May contain mIRC color codes.  Description:    ph cmd /Executes a command as if it were typed in xchat' s input box.  Arguments: ph. The plugin handle which manages the command. text, The command to execute without the heading '/'.  Description:    ph ctx Changes the current context.  Arguments:  ph/ Plugin handle whose context is to be changed. ctx Context (given by  or ). Returns:  if successful,  else.  Description:    ph servname channel 3Finds a context based on a channel and servername. If servname is ), it finds the channel (or query) by the Igiven name in the same server group as the current context. If that doesn't (exists then find any by the given name. If channel is , it finds the front-most tab/window of the given servname.  Arguments:  ph Plugin handle. servname Servername. channel Channelname. Returns: (Context (for use with xChatSetContext).  Description:    ph Get the current context.  Arguments:  ph- Plugin handle whose context is to be taken. Returns: The current context.  Description:    ph s1 s2 >Performs a nick name comparision, based on the current server Mconnection. This might be a RFC1459 compliant string compare, or plain ascii I(in the case of DALNet). Use this to compare channels and nicknames. The +function works the same way as strcasecmp. Quote from RFC1459: Because of IRC'<s scandanavian origin, the characters {}| are considered to 4 be the lower case equivalents of the characters []\, respectively. P This is a critical issue when determining the equivalence of two nicknames.  Arguments:  ph- Plugin handle whose context is to be taken. s1 1st string to compare s2 2nd string to compare Returns: #The comparison of the two strings.  Description:    ph info 3Returns information based on your current context.  Arguments:  ph Plugin handle. id= ID of the information you want. Currently supported IDs are  (case sensitive):  [away] away reason or  if you are not away.  [channel] current channel name.  [charset]1 character-set used in the current context.  [event_text]& text event format string for name.  [host]7 real hostname of the server you connected to.  [inputbox]6 the input-box contents, what the user has typed.  [libdirfs] library directory. e.g. /usr/lib/xchat. The same : directory used for auto-loading plugins.  This string isn'$t necessarily UTF-8, but local file " system encoding.  [modes]$ channel modes, if known, or .  [network] current network name or .  [nick]! your current nick name.  [nickserv]+ nickserv password for this network or .  [server]; current server name (what the server claims to be).   if you are not connected.  [topic] current channel topic.  [version] xchat version number.  [win_ptr]> native window pointer. Unix: (GtkWindow *) Win32: HWND.  [win_status] window status: "active", "hidden" or "normal".  [xchatdir]# xchat config directory, e.g.: /home/user/ .xchat2 This F string is encoded in UTF-8, which means you _should_  convert it to "locale"! encoding before using functions H like open() or OpenFile(). For best Unicode support on K Linux, convert this string using g_filename_from_utf8 and K on Windows convert this string to UTF-16LE (wide) and use " OpenFileW() etc.  [xchatdirfs]! xchat config directory, e.g.: /home/user/ .xchat2. = This string is encoded in local file system I encoding, making it ideal for direct use with functions H like open() or OpenFile(). For real Unicode support on  Windows, it'+s best not to use xchatdirfs, but xchatdir  instead. Returns: *A string of the requested information, or .  Description:    ph pref Provides xchat's setting information %(that which is available through the "/set" command). 3A few extra bits of information are available that don't appear in the "/set list", currently they are:   state_cursor< Current input-box cursor position (characters, not bytes). id Unique server id.  Arguments:  ph Plugin handle. pref Setting name required. Returns:  A failure, a , a  or an  according to  the s case.  Description:    ph ev args Generates a print event. PThis can be any event found in the Preferences > Advanced > Text Events window. The args! are the arguments of the event. /Special care should be taken when calling this 'function inside a print callback (from ), #as not to cause endless recursion.  Arguments:  ph Plugin handle. ev Text event to print. args" Arguments of the event to print. Returns:  in case of success  else. Example:   "Channel Message" ["John", "Hi there", "@"]  Description:   ph str_list mpl sgn mode  @ Sends a number of channel mode changes to the current channel. < For example, you can Op a whole group of people in one go. 5 It may send multiple MODE lines if the request doesn't fit on one.  Pass  for mpl to use the current server's maximum possible. A This function should only be called while in a channel context.  Arguments:  ph The plugin handle str_list The targets mpl The number of modes per line sgn The sign (True is '+', False is '-') mode The mode char, e.g. 'o' for Ops Example:  "Alice":"Bob":[] 3 True 'o' Description:    str rules Strips mIRC color codes and/*or text attributes (bold, underlined etc) 0from the given string and returns a new string. 3The original function had an unused plugin handle.  Arguments: str The string to strip rules& The description of the plugin to add   Undocumented  Description:    ph filename pdesc <Add of a new GUI plugin to the list of the current plugins. <Due to lack of documentation, it is not further documented. ;In the original source code, such added plugins are tagged 'fake'. NIt seems that beside their name, file name, version, description and position Kin the list, there is no memory allocation. Furthermore, the original code had an extra unused argument.  Arguments: phE The plugin handle to be used by default if the USE_PLUGIN directive K was not given at compile time for XChat, if the USE_PLUGIN directive E was provided, a new plugin handle is created, with the data of  [ph] passed by filename8 The path name of the file containing the plugin to add pdesc& The description of the plugin to add   Undocumented  Description:    ph The counterpart of  function. So it is used to remove 'fake'+ plugins. Once again, one of the arguments 8is unused in the original source code, so I removed it.  Arguments: ph! The plugin handle to be removed   Undocumented  Description:    str 8Converts a string to its internal XChat representation. :I automatically free it to avoid memory leak, although as I don'2t know what it really does, it may be a bad idea. /The original code had an unused plugin handle.  Arguments: str The string to convert   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xyz{|qp}LMNOPQRSTUVWHKJI89:;<=>?@ABCDEFG1765432,0/.- !"#$%&'()*+ oklmnjcihgfedb~\]^_`arswvutXYZ[2    !"#$%&'()*+,0/.-176543289:;<=>?@ABCDEFGHKJIL MNOPQRSTUVWXYZ[\]^_`abcihgfedjklmnopqrswvutxyz{|}~ Safe-Infered Safe-Infered       !"#$%&'()*+,-./01234567789:;<=>?@ABCDEFGHIJJKLMNOPQRSTUUVWXXYZ[\]^_`abcdeffghijklmnopqrrstuvwxyz{|}~xchat-plugin-0.0.3Network.IRC.XChat.Plugin!Network.IRC.XChat.Examples.AutoOp$Network.IRC.XChat.Examples.CountDownUseruAway uLasttalkuNickuHostuPrefix uRealname uSelectedNotify nNetworksnNicknOnlinenOnnOffnSeenIgniMaskiFlagsIgnFlgsprivatenoticechannelctcpinviteunIgnorenoSavedccDcc dAddress32dCps dDestfiledFiledNickdPortdPosdResumedSizedStatusdTypeDccType DccChatSend DccChatRecv DccReceiveDccSend DccStatus DccAborted DccConnectingDccDone DccFailed DccActive DccQueuedChancChannel cChantypescContextcFlagscIdcLag cMaxmodescNetwork cNickprefixes cNickmodescQueuecServercTypecUsersChanType ChanDialog ChanChannel ChanServerChanFlgs connected connectingawayloggedwhoxidmsgjPmsgbeep blinkTray blinkTask StripRulesnoColor noAttributeFlagsfgReadfgWritefgExnfgNsock PriorityA PriorityCCustomLowestLowNormHighHighestHookEatingeatXChat eatPlugin XChatHook XChatPlugin XchatPlugin XChatContext SettingResultSetIntSetBool SetString SetFailurePluginDescriptor pluginNamepluginDescription pluginVersionxChatPluginInitabstractPriorityconcretePriorityxChatHookCommandxChatHookServerxChatHookPrintxChatHookTimer xChatHookFd xChatUnhook xChatPrint xChatCommandxChatSetContextxChatFindContextxChatGetContext xChatNickcmp xChatGetInfo xChatGetPrefsxChatEmitPrintxChatSendModes xChatStripxChatPluginguiAddxChatPluginguiRemove xChatGettextxChatGetNotifyListxChatGetUserListxChatGetIgnListxChatGetDccListxChatGetChanListNBool pluginInitMemoghc-prim GHC.TypesTruebaseGHC.Base++>>return Data.MaybeNothingMaybeIntJustFalseStringBoolGHC.IntInt32