summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-28 10:49:44 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-10-28 10:49:44 +0100
commit6a9e7bb4d349b419816891e85ae8e95c46b9d2f5 (patch)
tree8ed4ee10b38b9c1032577183b910d53a37290cb1 /plugins
parentfe6bda343b10909d9f5b6a3e1ac4b232f1875411 (diff)
Further doc relocations and conversions
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fishlim/README45
-rw-r--r--plugins/perl/hexchat-perl.html1207
-rw-r--r--plugins/perl/hexchat-perldocs.html475
-rw-r--r--plugins/plugin20.html1141
-rw-r--r--plugins/python/hexchat-python.md545
-rw-r--r--plugins/tcl/README55
6 files changed, 0 insertions, 3468 deletions
diff --git a/plugins/fishlim/README b/plugins/fishlim/README
deleted file mode 100644
index 00d7f682..00000000
--- a/plugins/fishlim/README
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-                                FiSHLiM
-
-                       http://fishlim.kodafritt.se/
-
-
-FiSHLiM is an XChat plugin for FiSH IRC encryption. It's my attempt at making
-a simple, lightweight and secure plugin for this encryption protocol.
-
-For installation instructions, see the INSTALL file.
-
-
-Features
---------
-
-Working:
-  * Sending/receiving messages
-  * Topic decryption
-  * Using unecrypted keys / keys without a password from blow.ini
-  * Pure protocol-level filtering (works with highlighting, nick coloring etc)
-  * Partially encrypted messages (i.e. prefixed with nickname by a bouncer)
-
-Not working:
-  * Key exchange
-  * Password-protected key storage
-  * Topic encryption
-  * Remote exploitation (hopefully!)
-  * Plaintext content that contain +OK is decrypted twice
-
-
-Commands
---------
-
-/setkey  [nick or #channel]  password
-
-    Sets the encryption key for the nick or channel to password. The keys
-    are stored in the configuration file in ~/.xchat2/blow.ini
-
-
-/delkey  nick-or-#channel
-
-    Deletes the given nick or channel from the configuration file.
-
-
diff --git a/plugins/perl/hexchat-perl.html b/plugins/perl/hexchat-perl.html
deleted file mode 100644
index 6092047e..00000000
--- a/plugins/perl/hexchat-perl.html
+++ /dev/null
@@ -1,1207 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>X-Chat 2 Perl Interface</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:khisanth@miyu.hopto.org" />
-<style type="text/css">
-	.branch {
-		list-style: none;
-	}
-
-	li code {
-		padding-right: 0.5em;
-	}
-
-	.example {
-		width: 98%;
-		padding: 0.5em;
-		float: left;
-		font-family: monospace;
-	}
-
-	.example .line_number {
-		float: left;
-		text-align: right;
-		margin-right: 10px;
-		padding-right: 5px;
-		border-right: 1px solid white;
-	}
-
-	.example .content {
-		float: left;
-	}
-
-	.example .content pre {
-		margin: 0;
-	}
-
-	td > table {
-		margin: 0.5em;
-		border-collapse: collapse;
-	}
-
-	td > table td {
-		border: 1px solid black;
-	}
-
-	.synComment {
-		color: rgb(135,206,235);
-	}
-	.synPreProc {
-		color: rgb(205,92,92);
-	}
-	.synError {
-	}
-	.synConstant {
-		color: #ffa0a0;
-	}
-	.synSpecial {
-		color: rgb(255,222,173);
-	}
-	.synIgnore {
-		color: rgb(102,102,102);
-	}
-	.synNormal {
-		color: rgb(255,255,255);
-		background-color: rgb(51,51,51);
-	}
-	.synType {
-		color: rgb(189,183,107);
-	}
-	.synIdentifier {
-		color: rgb(152,251,152);
-	}
-	.synTodo {
-		color: rgb(255,69,0);
-		background-color: rgb(238,238,0);
-	}
-	.synStatement {
-		color: rgb(240,230,140);
-	}
-
-</style>
-</head>
-
-<body style="background-color: white">
-<table border="0" width="100%" cellspacing="0" cellpadding="3">
-<tr><td class="block" style="background-color: #cccccc" valign="middle">
-<big><strong><span class="block">&nbsp;X-Chat 2 Perl Interface</span></strong></big>
-</td></tr>
-</table>
-
-
-<!-- INDEX BEGIN -->
-<div>
-<p><a name="__index__"></a></p>
-
-<ul>
-	<li><a href="#x_chat_2_perl_interface">X-Chat 2 Perl Interface</a></li>
-	<li class="branch">
-		<ul>
-		<li><a href="#introduction">Introduction</a></li>
-		<li><a href="#constants">Constants</a></li>
-		<li class="branch">
-			<ul>
-			<li><a href="#priorities">Priorities</a></li>
-			<li><a href="#return_values">Return values</a></li>
-			<li class="branch">
-				<ul>
-				<li><a href="#timer_and_fd_hooks">Timer and fd hooks</a></li>
-				</ul>
-			</li>
-
-			<li><a href="#hook_fd_flags">hook_fd flags</a></li>
-			</ul>
-		</li>
-
-		<li><a href="#functions">Functions</a></li>
-		<li class="branch">
-			<ul>
-			<li><a href="#xchat_register"><code>Xchat::register( $name, $version, [$description,[$callback]] )</code></a></li>
-			<li><a href="#xchat_hook_server"><code>Xchat::hook_server( $message, $callback, [\%options] )</code></a></li>
-			<li><a href="#xchat_hook_command"><code>Xchat::hook_command( $command, $callback, [\%options] )</code></a></li>
-			<li><a href="#xchat_hook_print"><code>Xchat::hook_print( $event,$callback, [\%options] )</code></a></li>
-			<li><a href="#xchat_hook_timer"><code>Xchat::hook_timer( $timeout,$callback, [\%options | $data] )</code></a></li>
-			<li><a href="#xchat_hook_fd"><code>Xchat::hook_fd( $handle, $callback, [ \%options ] )</code></a></li>
-			<li class="branch">
-				<ul>
-				<li><a href="#when_callbacks_are_invoked">When callbacks are invoked</a></li>
-				<li><a href="#callback_arguments">Callback Arguments</a></li>
-				<li><a href="#callback_return_values">Callback return values</a></li>
-				<li><a href="#miscellaneous_hook_related_information">Miscellaneous Hook Related Information</a></li>
-				</ul>
-			</li>
-
-			<li><a href="#xchat_unhook"><code>Xchat::unhook( $hook )</code></a></li>
-			<li><a href="#xchat_print"><code>Xchat::print( $text | \@lines, [$channel,[$server]] )</code></a></li>
-			<li><a href="#xchat_printf"><code>Xchat::printf( $format, LIST )</code></a></li>
-			<li><a href="#xchat_command"><code>Xchat::command( $command | \@commands, [$channel,[$server]] )</code></a></li>
-			<li><a href="#xchat_commandf"><code>Xchat::commandf( $format, LIST )</code></a></li>
-			<li><a href="#xchat_find_context"><code>Xchat::find_context( [$channel, [$server]] )</code></a></li>
-			<li><a href="#xchat_get_context"><code>Xchat::get_context()</code></a></li>
-			<li><a href="#xchat_set_context"><code>Xchat::set_context( $context | $channel,[$server] )</code></a></li>
-			<li><a href="#xchat_get_info"><code>Xchat::get_info( $id )</code></a></li>
-			<li><a href="#xchat_get_prefs"><code>Xchat::get_prefs( $name )</code></a></li>
-			<li><a href="#xchat_emit_print"><code>Xchat::emit_print( $event, LIST )</code></a></li>
-			<li><a href="#xchat_send_modes"><code>Xchat::send_modes( $target | \@targets, $sign, $mode, [ $modes_per_line ] )</code></a></li>
-			<li><a href="#xchat_nickcmp"><code>Xchat::nickcmp( $nick1, $nick2 )</code></a></li>
-			<li><a href="#xchat_get_list"><code>Xchat::get_list( $name )</code></a></li>
-			<li><a href="#xchat_user_info"><code>Xchat::user_info( [$nick] )</code></a></li>
-			<li><a href="#xchat_context_info"><code>Xchat::context_info( [$context] )</code></a></li>
-			<li><a href="#xchat_strip_code"><code>Xchat::strip_code( $string )</code></a></li>
-			</ul>
-		</li>
-
-		<li><a href="#examples">Examples</a></li>
-		<li class="branch">
-			<ul>
-			<li><a href="#asynchronous_dns_resolution_with_hook_fd">Asynchronous DNS resolution with hook_fd</a></li>
-			</ul>
-		</li>
-
-		<li><a href="#contact_information">Contact Information</a></li>
-		</ul>
-	</li>
-</ul>
-
-<hr />
-</div>
-<!-- INDEX END -->
-
-<p>
-</p>
-<h1><a name="x_chat_2_perl_interface" />X-Chat 2 Perl Interface</h1>
-<p>
-</p>
-<h2><a name="introduction" />Introduction</h2>
-<p>This is the new Perl interface for X-Chat 2.  However, due to changes in
-xchat's plugin code you will need xchat 2.0.8 or above to load this.  Scripts
-written using the old interface will continue to work. If there are any
-problems, questions, comments or suggestions please email them to the address
-on the bottom of this page.</p>
-<p>
-</p>
-<h2><a name="constants" />Constants</h2>
-<p>
-</p>
-<h3><a name="priorities" />Priorities</h3>
-<ul>
-<li><strong><code>Xchat::PRI_HIGHEST</code></strong>
-</li>
-<li><strong><code>Xchat::PRI_HIGH</code></strong>
-</li>
-<li><strong><code>Xchat::PRI_NORM</code></strong>
-</li>
-<li><strong><code>Xchat::PRI_LOW</code></strong>
-</li>
-<li><strong><code>Xchat::PRI_LOWEST</code></strong>
-</li>
-</ul>
-<p>
-</p>
-<h3><a name="return_values" />Return values</h3>
-<ul>
-<li><strong><code>Xchat::EAT_NONE</code>     - pass the event along</strong>
-</li>
-<li><strong><code>Xchat::EAT_XCHAT</code>    - don't let xchat see this event</strong>
-</li>
-<li><strong><code>Xchat::EAT_PLUGIN</code>   - don't let other scripts and plugins see this event but xchat will still see it</strong>
-</li>
-<li><strong><code>Xchat::EAT_ALL</code>      - don't let anything else see this event</strong>
-</li>
-</ul>
-<p>
-</p>
-<h4><a name="timer_and_fd_hooks" />Timer and fd hooks</h4>
-<ul>
-<li><strong><code>Xchat::KEEP</code>         - keep the timer going or hook watching the handle</strong>
-</li>
-<li><strong><code>Xchat::REMOVE</code>       - remove the timer or hook watching the handle</strong>
-</li>
-</ul>
-<p>
-</p>
-<h3><a name="hook_fd_flags" />hook_fd flags</h3>
-<ul>
-<li><strong><code>Xchat::FD_READ</code>			- invoke the callback when the handle is ready for reading</strong>
-</li>
-<li><strong><code>Xchat::FD_WRITE</code>		- invoke the callback when the handle is ready for writing</strong>
-</li>
-<li><strong><code>Xchat::FD_EXCEPTION</code>	- invoke the callback if an exception occurs</strong>
-</li>
-<li><strong><code>Xchat::FD_NOTSOCKET</code>	- indicate that the handle being hooked is not a socket</strong>
-</li>
-</ul>
-<p>
-</p>
-<h2><a name="functions" />Functions</h2>
-<p>
-</p>
-<h3><a name="xchat_register" /><code>Xchat::register( $name, $version, [$description,[$callback]] )</code></h3>
-<ul>
-<li><strong><code>$name</code>             -  The name of this script</strong>
-</li>
-<li><strong><code>$version</code>          -  This script's version</strong>
-</li>
-<li><strong><code>$description</code>   -  A description for this script</strong>
-</li>
-<li><strong><code>$callback</code>      -  This is a function that will be called when the is script
-                     unloaded. This can be either a reference to a
-                     function or an anonymous sub reference.</strong>
-</li>
-</ul>
-<p>This is the first thing to call in every script.</p>
-<p>
-</p>
-<h3><a name="xchat_hook_server" /><code>Xchat::hook_server( $message, $callback, [\%options] )</code></h3>
-<p>
-</p>
-<h3><a name="xchat_hook_command" /><code>Xchat::hook_command( $command, $callback, [\%options] )</code></h3>
-<p>
-</p>
-<h3><a name="xchat_hook_print" /><code>Xchat::hook_print( $event,$callback, [\%options] )</code></h3>
-<p>
-</p>
-<h3><a name="xchat_hook_timer" /><code>Xchat::hook_timer( $timeout,$callback, [\%options | $data] )</code></h3>
-<p>
-</p>
-<h3><a name="xchat_hook_fd" /><code>Xchat::hook_fd( $handle, $callback, [ \%options ] )</code></h3>
-<p>These functions can be to intercept various events.
-hook_server can be used to intercept any incoming message from the IRC server.
-hook_command can be used to intercept any command, if the command doesn't currently exist then a new one is created.
-hook_print can be used to intercept any of the events listed in Setttings-&gt;Advanced-&gt;Text Events
-hook_timer can be used to create a new timer</p>
-<ul>
-<li><strong><code>$message</code>       -  server message to hook such as PRIVMSG</strong>
-</li>
-<li><strong><code>$command</code>       -  command to intercept, without the leading /</strong>
-</li>
-<li><strong><code>$event</code>      -  one of the events listed in Settings-&gt;Advanced-&gt;Text Events</strong>
-</li>
-<li><strong><code>$timeout</code>       -  timeout in milliseconds</strong>
-</li>
-<li><strong><code>$handle</code>     - the I/O handle you want to monitor with hook_fd. This must be something that has a fileno. See perldoc -f fileno or <a href="http://perldoc.perl.org/functions/fileno.html">fileno</a></strong>
-</li>
-<li><strong><code>$callback</code>   -  callback function, this is called whenever
-                  the hooked event is trigged, the following are
-                  the conditions that will trigger the different hooks.
-                  This can be either a reference to a
-                  function or an anonymous sub reference.</strong>
-</li>
-<li><strong>\%options   -  a hash reference containing addional options for the hooks</strong>
-</li>
-</ul>
-<p>Valid keys for \%options:</p>
-<table border="1">   <tr>
-   <td>data</td>  <td>Additional data that is to be associated with the<br />
-                  hook. For timer hooks this value can be provided either as<br />
-                  <code>Xchat::hook_timer( $timeout, $cb,{data=&gt;$data})</code><br />
-                  or <code>Xchat::hook_timer( $timeout, $cb, $data )</code>.<br />
-                  However, this means that hook_timer cannot be provided<br />
-                  with a hash reference containing data as a key.<br />                  example:<br />
-                  my $options = { data =&gt; [@arrayOfStuff] };<br />
-                  Xchat::hook_timer( $timeout, $cb, $options );<br />
-                  <br />
-                  In this example, the timer's data will be<br />
-                  [@arrayOfStuff] and not { data =&gt; [@arrayOfStuff] }<br />
-                  <br />
-                  This key is valid for all of the hook functions.<br />
-                  <br />
-                  Default is undef.<br />
-                  </td>
-   </tr>   <tr>
-      <td>priority</td> <td>Sets the priority for the hook.<br />
-                        It can be set to one of the
-                        <code>Xchat::PRI_*</code> constants.<br />
-                        <br />
-                        This key only applies to server, command
-                        and print hooks.<br />
-                        <br />
-                        Default is <code>Xchat::PRI_NORM</code>.
-                        </td>   </tr>   <tr>
-      <td>help_text</td>   <td>Text displayed for /help $command.<br />
-                           <br />
-                           This key only applies to command hooks.<br />
-                           <br />
-                           Default is "".
-                           </td>
-   </tr>   <tr>
-      <td>flags</td>   <td>Specify the flags for a fd hook.<br />
-                       <br />
-                       See <a href="#hook_fd_flags">hook fd flags</a> section for valid values.<br />
-                       <br />
-                       On Windows if the handle is a pipe you specify<br />
-                       Xchat::FD_NOTSOCKET in addition to any other flags you might be using.<br />
-                       <br />
-                       This key only applies to fd hooks.<br />
-                       Default is Xchat::FD_READ
-                           </td>
-   </tr></table><p>
-</p>
-<h4><a name="when_callbacks_are_invoked" />When callbacks are invoked</h4>
-<p>Each of the hooks will be triggered at different times depending on the type
-of hook.</p>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>Hook Type</td>   <td>When the callback will be invoked</td>
-   </tr>   <tr>
-      <td>server hooks</td>   <td>a <code>$message</code> message is 
-                              received from the server
-                              </td>
-   </tr>   <tr>
-      <td>command hooks</td>  <td>the <code>$command</code> command is
-                              executed, either by the user or from a script
-                              </td>
-   </tr>   <tr>
-      <td>print hooks</td> <td>X-Chat is about to print the message for the
-                           <code>$event</code> event
-                           </td>
-   </tr>   <tr>
-      <td>timer hooks</td> <td>called every <code>$timeout</code> milliseconds
-                           (1000 millisecond is 1 second)<br />
-                           the callback will be executed in the same context where
-                           the hook_timer was called, if the context no longer exists
-                           then it will execute in a random context
-                           </td>
-   </tr>   <tr>
-      <td>fd hooks</td> <td>depends on the flags that were passed to hook_fd<br />
-                        See <a href="#hook_fd_flags">hook_fd flags</a> section.
-                        </td>
-   </tr>
-</table><p>The value return from these hook functions can be passed to <code>Xchat::unhook</code> 
-to remove the hook.</p>
-<p>
-</p>
-<h4><a name="callback_arguments" />Callback Arguments</h4>
-<p>All callback functions will receive their arguments in <code>@_</code> like every
-other Perl subroutine.</p>
-<p>
-Server and command callbacks<br />
-<br />
-<code>$_[0]</code>   -  array reference containing the IRC message or command and
-arguments broken into words<br />
-example:<br />
-/command arg1 arg2 arg3<br />
-<code>$_[0][0]</code> -  command<br />
-<code>$_[0][1]</code> -  arg1<br />
-<code>$_[0][2]</code> -  arg2<br />
-<code>$_[0][3]</code> -  arg3<br />
-<br />
-<code>$_[1]</code>   -  array reference containing the Nth word to the last word<br />
-example:<br />
-/command arg1 arg2 arg3<br />
-<code>$_[1][0]</code>   -  command arg1 arg2 arg3<br />
-<code>$_[1][1]</code>   -  arg1 arg2 arg3<br />
-<code>$_[1][2]</code>   -  arg2 arg3<br />
-<code>$_[1][3]</code>   -  arg3<br />
-<br />
-<code>$_[2]</code>   -  the data that was passed to the hook function<br />
-<br />
-Print callbacks<br />
-<br />
-<code>$_[0]</code>   -  array reference containing the values for the
-                        text event see Settings-&gt;Advanced-&gt;Text Events<br />
-<code>$_[1]</code>   -  the data that was passed to the hook function<br />
-<br />
-Timer callbacks<br />
-<br />
-<code>$_[0]</code>   -  the data that was passed to the hook function<br />
-<br />fd callbacks<br />
-<br />
-<code>$_[0]</code>   -  the handle that was passed to hook_fd<br />
-<code>$_[1]</code>   -  flags indicating why the callback was called<br />
-<code>$_[2]</code>   -  the data that was passed to the hook function<br />
-</p><p>
-</p>
-<h4><a name="callback_return_values" />Callback return values</h4>
-<p>All server, command and print  callbacks should return one of
-the <code>Xchat::EAT_*</code> constants.
-Timer callbacks can return Xchat::REMOVE to remove
-the timer or Xchat::KEEP to keep it going</p>
-<p>
-</p>
-<h4><a name="miscellaneous_hook_related_information" />Miscellaneous Hook Related Information</h4>
-<p>For server hooks, if <code>$message</code> is &quot;RAW LINE&quot; then <code>$cb</code> will be called for
-every IRC message than X-Chat receives.</p>
-<p>For command hooks if <code>$command</code> is &quot;&quot; then <code>$cb</code> will be called for
-messages entered by the user that is not a command.</p>
-<p>For print hooks besides those events listed in 
-Settings-&gt;Advanced-&gt;Text Events, these additional events can be used.</p>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>Event</td> <td>Description</td>
-   </tr>   <tr>
-      <td>"Open Context"</td> <td>a new context is created</td>
-   </tr>   <tr>
-      <td>"Close Context"</td>   <td>a context has been close</td>
-   </tr>   <tr>
-      <td>"Focus Tab"</td> <td>when a tab is brought to the front</td>
-   </tr>   <tr>
-      <td>"Focus Window"</td> <td>when a top level window is focused or the
-                              main tab window is focused by the window manager
-                              </td>
-   </tr>   <tr>
-      <td>"DCC Chat Text"</td>   <td>when text from a DCC Chat arrives.
-                                 <code>$_[0]</code> will have these values<br />
-                                 <br />
-                                 <code>$_[0][0]</code>   -  Address<br />
-                                 <code>$_[0][1]</code>   -  Port<br />
-                                 <code>$_[0][2]</code>   -  Nick<br />
-                                 <code>$_[0][3]</code>   -  Message<br />
-                                 </td>
-   </tr>   <tr>
-      <td>"Key Press"</td> <td>used for intercepting key presses<br />
-			$_[0][0] - key value<br />
-			$_[0][1] - state bitfield, 1 - shift, 4 - control, 8 - alt<br />
-			$_[0][2] - string version of the key which might be empty for unprintable keys<br />
-			$_[0][3] - length of the string in $_[0][2]<br />
-		</td>
-   </tr>
-</table><p>
-</p>
-<h3><a name="xchat_unhook" /><code>Xchat::unhook( $hook )</code></h3>
-<ul>
-<li><strong><code>$hook</code>    -  the hook that was previously returned by one of the <code>Xchat::hook_*</code> functions</strong>
-</li>
-</ul>
-<p>This function is used to removed a hook previously added with one of
-the <code>Xchat::hook_*</code> functions</p>
-<p>It returns the data that was passed to the <code>Xchat::hook_*</code> function when
-the hook was added</p>
-<p>
-</p>
-<h3><a name="xchat_print" /><code>Xchat::print( $text | \@lines, [$channel,[$server]] )</code></h3>
-<ul>
-<li><strong><code>$text</code>    -  the text to print</strong>
-</li>
-<li><strong><code>\@lines</code>  -  array reference containing lines of text to be printed
-               all the elements will be joined together before printing</strong>
-</li>
-<li><strong><code>$channel</code> -  channel or tab with the given name where <code>$text</code>
-               will be printed</strong>
-</li>
-<li><strong><code>$server</code>  -  specifies that the text will be printed in a channel or tab
-               that is associated with <code>$server</code></strong>
-</li>
-</ul>
-<p>The first argument can either be a string or an array reference of strings.
-Either or both of <code>$channel</code> and <code>$server</code> can be undef.</p>
-<p>If called as <code>Xchat::print( $text )</code>, it will always return true.
-If called with either the channel or the channel and the server
-specified then it will return true if a context is found and
-false otherwise. The text will not be printed if the context
-is not found.  The meaning of setting <code>$channel</code> or <code>$server</code> to
-undef is the same as
-<a href="#xchat_find_context">find_context</a>.</p>
-<p>
-</p>
-<h3><a name="xchat_printf" /><code>Xchat::printf( $format, LIST )</code></h3>
-<ul>
-<li><strong><code>$format</code>  -  a format string, see &quot;perldoc -f <a href="http://perldoc.perl.org/functions/sprintf.html">sprintf</a>&quot; for further detail</strong>
-</li>
-<li><strong>LIST     -  list of values for the format fields</strong>
-</li>
-</ul>
-<p>
-</p>
-<h3><a name="xchat_command" /><code>Xchat::command( $command | \@commands, [$channel,[$server]] )</code></h3>
-<ul>
-<li><strong><code>$command</code> -  the command to execute, without the leading /</strong>
-</li>
-<li><strong><code>\@commands</code>  -  array reference containing a list of commands to execute</strong>
-</li>
-<li><strong><code>$channel</code> -  channel or tab with the given name where <code>$command</code> will be executed</strong>
-</li>
-<li><strong><code>$server</code>  -  specifies that the command will be executed in a channel or tab that is associated with <code>$server</code></strong>
-</li>
-</ul>
-<p>The first argument can either be a string or an array reference of strings.
-Either or both of <code>$channel</code> and <code>$server</code> can be undef.</p>
-<p>If called as <code>Xchat::command( $command )</code>, it will always return true.
-If called with either the channel or the channel and the server
-specified then it will return true if a context is found and false
-otherwise. The command will not be executed if the context is not found.
-The meaning of setting <code>$channel</code> or <code>$server</code> to undef is the same
-as find_context.</p>
-<p>
-</p>
-<h3><a name="xchat_commandf" /><code>Xchat::commandf( $format, LIST )</code></h3>
-<ul>
-<li><strong><code>$format</code> -  a format string, see &quot;perldoc -f <a href="http://perldoc.perl.org/functions/sprintf.html">sprintf</a>&quot; for further detail</strong>
-</li>
-<li><strong>LIST     -  list of values for the format fields</strong>
-</li>
-</ul>
-<p>
-</p>
-<h3><a name="xchat_find_context" /><code>Xchat::find_context( [$channel, [$server]] )</code></h3>
-<ul>
-<li><strong><code>$channel</code> -  name of a channel</strong>
-</li>
-<li><strong><code>$server</code>  -  name of a server</strong>
-</li>
-</ul>
-<p>Either or both of <code>$channel</code> and $server can be undef. Calling
-<code>Xchat::find_context()</code> is the same as calling
-<code>Xchat::find_context( undef, undef)</code> and
-<code>Xchat::find_context( $channel )</code> is
-the same as <code>Xchat::find_context( $channel, undef )</code>.</p>
-<p>If <code>$server</code> is undef, find any channel named $channel.
-If <code>$channel</code> is undef, find the front most window
-or tab named <code>$server</code>.If both $channel and
-<code>$server</code> are undef, find the currently focused tab or window.</p>
-<p>Return the context found for one of the above situations or undef if such
-a context cannot be found.</p>
-<p>
-</p>
-<h3><a name="xchat_get_context" /><code>Xchat::get_context()</code></h3>
-<p>Returns the current context.</p>
-<p>
-</p>
-<h3><a name="xchat_set_context" /><code>Xchat::set_context( $context | $channel,[$server] )</code></h3>
-<ul>
-<li><strong><code>$context</code> -  context value as returned from <a href="#xchat_get_context">get_context</a>,<a href="#xchat_find_context">find_context</a> or one
-               of the fields in the list of hashrefs returned by list_get</strong>
-</li>
-<li><strong><code>$channel</code> -  name of a channel you want to switch context to</strong>
-</li>
-<li><strong><code>$server</code>  -  name of a server you want to switch context to</strong>
-</li>
-</ul>
-<p>See <a href="#xchat_find_context">find_context</a> for more details on <code>$channel</code> and <code>$server</code>.</p>
-<p>Returns true on success, false on failure</p>
-<p>
-</p>
-<h3><a name="xchat_get_info" /><code>Xchat::get_info( $id )</code></h3>
-<ul>
-<li><strong><code>$id</code>   -  one of the following case sensitive values</strong>
-</li>
-</ul>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>ID</td>
-      <td>Return value</td>
-      <td>Associated Command(s)</td>
-   </tr>   <tr>
-      <td>away</td>
-      <td>away reason or undef if you are not away</td>
-      <td>AWAY, BACK</td>
-   </tr>   <tr>
-      <td>channel</td>
-      <td>current channel name</td>
-      <td>SETTAB</td>
-   </tr>   <tr>
-      <td>charset</td>
-      <td>character-set used in the current context</td>
-      <td>CHARSET</td>
-   </tr>   <tr>
-      <td>event_text &lt;Event Name&gt;</td> <td>text event format string for &lt;Event name&gt;<br />
-      Example:
-   <div class="example synNormal"><div class='line_number'>
-<div>1</div>
-</div>
-<div class='content'><pre><span class="synStatement">my</span> <span class="synIdentifier">$channel_msg_format</span> = Xchat::get_info( <span class="synStatement">&quot;</span><span class="synConstant">event_text Channel Message</span><span class="synStatement">&quot;</span> );
-</pre></div>
-</div>
-   </td>
-   <td></td>
-</tr>
-<tr>
-   <td>host</td>
-   <td>real hostname of the current server</td>
-   <td></td>
-</tr><tr>
-   <td>id</td>
-   <td>connection id</td>
-   <td></td>
-</tr><tr>
-   <td>inputbox</td>
-   <td>contents of the inputbox</td>
-   <td>SETTEXT</td>
-</tr><tr>
-   <td>libdirfs</td>
-   <td>the system wide directory where xchat will look for plugins.
-   this string is in the same encoding as the local file system</td>
-   <td></td>
-</tr><tr>
-   <td>modes</td>
-   <td>the current channels modes or undef if not known</td>
-   <td>MODE</td>
-</tr><tr>
-   <td>network</td>
-   <td>current network name or undef, this value is taken from the Network List</td>
-   <td></td>
-</tr><tr>
-   <td>nick</td>
-   <td>current nick</td>
-   <td>NICK</td>
-</tr><tr>
-   <td>nickserv</td>
-   <td>nickserv password for this network or undef, this value is taken from the Network List</td>
-   <td></td>
-</tr><tr>
-   <td>server</td>   <td>current server name <br />
-                     (what the server claims to be) undef if not connected
-                     </td>
-   <td></td>
-</tr><tr>
-   <td>state_cursor</td>
-   <td>current inputbox cursor position in characters</td>
-   <td>SETCURSOR</td>
-</tr><tr>
-   <td>topic</td>
-   <td>current channel topic</td>
-   <td>TOPIC</td>
-</tr><tr>
-   <td>version</td>
-   <td>xchat version number</td>
-   <td></td>
-</tr><tr>
-   <td>win_status</td>
-   <td>status of the xchat window, possible values are "active", "hidden"
-   and "normal"</td>
-   <td>GUI</td>
-</tr><tr>
-  <td>win_ptr</td> <td>native window pointer, GtkWindow * on Unix, HWND on Win32.<br />
-  On Unix if you have the Glib module installed you can use my $window = Glib::Object->new_from_pointer( Xchat::get_info( "win_ptr" ) ); to get a Gtk2::Window object.<br />
-  Additionally when you have detached tabs, each of the windows will return a different win_ptr for the different Gtk2::Window objects.<br />
-  See <a href="http://xchat.cvs.sourceforge.net/viewvc/xchat/xchat2/plugins/perl/char_count.pl?view=markup">char_count.pl</a> for a longer example of a script that uses this to show how many characters you currently have in your input box.
-  </td>
-  <td></td>
-</tr>
-<tr>
-  <td>gtkwin_ptr</td>
-  <td>similar to win_ptr except it will always be a GtkWindow *</td>
-  <td></td>
-</tr>
-<tr>
-   <td>xchatdir</td> <td>xchat config directory encoded in UTF-8<br />
-                     examples:<br />
-                     /home/user/.xchat2<br />
-                     C:\Documents and Settings\user\Application Data\X-Chat 2
-                     </td>
-   <td></td>
-</tr><tr>
-   <td>xchatdirfs</td>  <td>same as xchatdir except encoded in the locale file system encoding</td>
-   <td></td>
-</tr>
-</table><p>This function is used to retrieve certain information about the current
-context. If there is an associated command then that command can be used to change the value for a particular ID.</p><p>
-</p>
-<h3><a name="xchat_get_prefs" /><code>Xchat::get_prefs( $name )</code></h3>
-<ul>
-<li><strong><code>$name</code> -  name of a X-Chat setting (available through the /set command)</strong>
-</li>
-</ul>
-<p>This function provides a way to retrieve X-Chat's setting information.</p>
-<p>Returns <code>undef</code> if there is no setting called called <code>$name</code>.</p>
-<p>
-</p>
-<h3><a name="xchat_emit_print" /><code>Xchat::emit_print( $event, LIST )</code></h3>
-<ul>
-<li><strong><code>$event</code>   -  name from the Event column in Settings-&gt;Advanced-&gt;Text Events</strong>
-</li>
-<li><strong>LIST     -  this depends on the Description column on the bottom of Settings-&gt;Advanced-&gt;Text Events</strong>
-</li>
-</ul>
-<p>This functions is used to generate one of the events listed under
-Settings-&gt;Advanced-&gt;Text Events</p>
-<p>Note: when using this function you MUST return Xchat::EAT_ALL otherwise you will end up with duplicate events.
-One is the original and the second is the one you emit.</p>
-<p>Returns true on success, false on failure</p>
-<p>
-</p>
-<h3><a name="xchat_send_modes" /><code>Xchat::send_modes( $target | \@targets, $sign, $mode, [ $modes_per_line ] )</code></h3>
-<ul>
-<li><strong><code>$target</code>  -  a single nick to set the mode on</strong>
-</li>
-<li><strong><code>\@targets</code>   -  an array reference of the nicks to set the mode on</strong>
-</li>
-<li><strong><code>$sign</code> - the mode sign, either '+' or '-'</strong>
-</li>
-<li><strong><code>$mode</code> - the mode character such as 'o' and 'v', this can only be one character long</strong>
-</li>
-<li><strong><code>$modes_per_line</code>   -  an optional argument maximum number of modes to send per at once, pass 0 use the current server's maximum (default)</strong>
-</li>
-</ul>
-<p>Send multiple mode changes for the current channel. It may send multiple MODE lines if the request doesn't fit on one.</p>
-<p>Example:</p>
-<div class="example synNormal"><div class='line_number'>
-<div>1</div>
-<div>2</div>
-<div>3</div>
-<div>4</div>
-<div>5</div>
-<div>6</div>
-<div>7</div>
-<div>8</div>
-<div>9</div>
-<div>10</div>
-<div>11</div>
-<div>12</div>
-<div>13</div>
-<div>14</div>
-</div>
-<div class='content'><pre><span class="synStatement">use strict</span>;
-<span class="synStatement">use </span>warning;
-<span class="synStatement">use </span>Xchat <span class="synStatement">qw(</span><span class="synConstant">:all</span><span class="synStatement">)</span>;
-
-hook_command( <span class="synStatement">&quot;</span><span class="synConstant">MODES</span><span class="synStatement">&quot;</span>, <span class="synStatement">sub </span>{
-   <span class="synStatement">my</span> (<span class="synStatement">undef</span>, <span class="synIdentifier">$who</span>, <span class="synIdentifier">$sign</span>, <span class="synIdentifier">$mode</span>) = <span class="synIdentifier">@{$_[</span><span class="synConstant">0</span><span class="synIdentifier">]}</span>;
-   <span class="synStatement">my</span> <span class="synIdentifier">@targets</span> = <span class="synStatement">split</span> <span class="synStatement">/</span><span class="synConstant">,</span><span class="synStatement">/</span>, <span class="synIdentifier">$who</span>;
-   <span class="synStatement">if</span>( <span class="synIdentifier">@targets</span> &gt; <span class="synConstant">1</span> ) {
-      send_modes( \<span class="synIdentifier">@targets</span>, <span class="synIdentifier">$sign</span>, <span class="synIdentifier">$mode</span>, <span class="synConstant">1</span> );
-   } <span class="synStatement">else</span> {
-      send_modes( <span class="synIdentifier">$who</span>, <span class="synIdentifier">$sign</span>, <span class="synIdentifier">$mode</span> );
-   }
-   <span class="synStatement">return</span> EAT_XCHAT;
-});
-</pre></div>
-</div><p>
-</p>
-<h3><a name="xchat_nickcmp" /><code>Xchat::nickcmp( $nick1, $nick2 )</code></h3>
-<ul>
-<li><strong><code>$nick1, $nick2</code> -  the two nicks or channel names that are to be compared</strong>
-</li>
-</ul>
-<p>The comparsion is based on the current server. Either a <a href="http://www.ietf.org/rfc/rfc1459.txt" class="rfc">RFC1459</a> compliant
-string compare or plain ascii will be using depending on the server. The
-comparison is case insensitive.</p>
-<p>Returns a number less than, equal to or greater than zero if
-<code>$nick1</code> is 
-found respectively, to be less than, to match, or be greater than
-<code>$nick2</code>.</p>
-<p>
-</p>
-<h3><a name="xchat_get_list" /><code>Xchat::get_list( $name )</code></h3>
-<ul>
-<li><strong><code>$name</code> -  name of the list, one of the following:
-&quot;channels&quot;, &quot;dcc&quot;, &quot;ignore&quot;, &quot;notify&quot;, &quot;users&quot;</strong>
-</li>
-</ul>
-<p>This function will return a list of hash references.  The hash references
-will have different keys depend on the list.  An empty list is returned
-if there is no such list.</p>
-<p>"channels"  -  list of channels, querys and their server</p><table border="1">   <tr style="background-color: #dddddd">
-      <td>Key</td>   <td>Description</td>
-   </tr>   <tr>
-      <td>channel</td>  <td>tab name</td>
-   </tr>   <tr>
-      <td>chantypes</td>
-      <td>channel types supported by the server, typically "#&amp;"</td>
-   </tr>   <tr>
-      <td>context</td>  <td>can be used with set_context</td>
-   </tr>   <tr>
-      <td>flags</td> <td>Server Bits:<br />
-                     0 - Connected<br />
-                     1 - Connecting<br />
-                     2 - Away<br />
-                     3 - EndOfMotd(Login complete)<br />
-                     4 - Has WHOX<br />
-                     5 - Has IDMSG (FreeNode)<br />
-                    <br />
-                    <p>The following correspond to the /chanopt command</p>
-                    6  - Hide Join/Part Message (text_hidejoinpart)<br />
-                    7  - unused (was for color paste)<br />
-                    8  - Beep on message (alert_beep)<br />
-                    9  - Blink Tray (alert_tray)<br />
-                    10 - Blink Task Bar (alert_taskbar)<br />
-<p>Example of checking if the current context has Hide Join/Part messages set:</p>
-<div class="example synNormal"><div class='line_number'>
-<div>1</div>
-<div>2</div>
-<div>3</div>
-</div>
-<div class='content'><pre><span class="synStatement">if</span>( Xchat::context_info-&gt;{flags} &amp; (<span class="synConstant">1</span> &lt;&lt; <span class="synConstant">6</span>) ) {
-  Xchat::<span class="synStatement">print</span>( <span class="synStatement">&quot;</span><span class="synConstant">Hide Join/Part messages is enabled</span><span class="synStatement">&quot;</span> );
-}
-</pre></div>
-</div>                     </td>
-   </tr>   <tr>
-      <td>id</td> <td>Unique server ID </td>
-   </tr>
-   
-   <tr>
-      <td>lag</td>
-      <td>lag in milliseconds</td>
-   </tr>   <tr>
-      <td>maxmodes</td> <td>Maximum modes per line</td>
-   </tr>   <tr>
-      <td>network</td>  <td>network name to which this channel belongs</td>
-   </tr>   <tr>
-      <td>nickprefixes</td>   <td>Nickname prefixes e.g. "+@"</td>
-   </tr>
-   
-   <tr>
-      <td>nickmodes</td>   <td>Nickname mode chars e.g. "vo"</td>
-   </tr>   <tr>
-      <td>queue</td>
-      <td>number of bytes in the send queue</td>
-   </tr>
-   
-   <tr>
-      <td>server</td>   <td>server name to which this channel belongs</td>
-   </tr>   <tr>
-      <td>type</td>  <td>the type of this context<br />
-                     1 - server<br />
-                     2 - channel<br />
-                     3 - dialog<br />
-                     4 - notices<br />
-                     5 - server notices<br />
-                     </td>
-   </tr>   <tr>
-      <td>users</td> <td>Number of users in this channel</td>
-   </tr>
-</table><p>"dcc"       -  list of DCC file transfers</p>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>Key</td>   <td>Value</td>
-   </tr>   <tr>
-      <td>address32</td>   <td>address of the remote user(ipv4 address)</td>
-   </tr>   <tr>
-      <td>cps</td>   <td>bytes per second(speed)</td>
-   </tr>   <tr>
-      <td>destfile</td> <td>destination full pathname</td>
-   </tr>   <tr>
-      <td>file</td>  <td>file name</td>
-   </tr>   <tr>
-      <td>nick</td>
-      <td>nick of the person this DCC connection is connected to</td>
-   </tr>   <tr>
-      <td>port</td>  <td>TCP port number</td>
-   </tr>   <tr>
-      <td>pos</td>   <td>bytes sent/received</td>
-   </tr>   <tr>
-      <td>poshigh</td>   <td>bytes sent/received, high order 32 bits</td>
-   </tr>   <tr>
-      <td>resume</td>   <td>point at which this file was resumed<br />
-                        (zero if it was not resumed)
-                        </td>
-   </tr>   <tr>
-      <td>resumehigh</td>   <td>point at which this file was resumed, high order 32 bits<br />
-                        </td>
-   </tr>   <tr>
-      <td>size</td>  <td>file size in bytes low order 32 bits</td>
-   </tr>   <tr>
-      <td>sizehigh</td>	<td>file size in bytes, high order 32 bits (when the files is > 4GB)</td>
-	</tr>
-	<tr>
-      <td>status</td>   <td>DCC Status:<br />
-                        0 - queued<br />
-                        1 - active<br />
-                        2 - failed<br />
-                        3 - done<br />
-                        4 - connecting<br />
-                        5 - aborted
-                        </td>
-   </tr>   <tr>
-      <td>type</td>  <td>DCC Type:<br />
-                     0 - send<br />
-                     1 - receive<br />
-                     2 - chatrecv<br />
-                     3 - chatsend
-                     </td>
-   </tr></table><p>"ignore"    -  current ignore list</p>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>Key</td> <td>Value</td>
-   </tr>   <tr>
-      <td>mask</td>  <td>ignore mask. e.g: *!*@*.aol.com</td>
-   </tr>   <tr>
-      <td>flags</td> <td>Bit field of flags.<br />
-                     0 - private<br />
-                     1 - notice<br />
-                     2 - channel<br />
-                     3 - ctcp<br />
-                     4 - invite<br />
-                     5 - unignore<br />
-                     6 - nosave<br />
-                     7 - dcc<br />
-                     </td>
-   </tr></table><p>"notify" - list of people on notify</p>
-<table border="1">
-   <tr style="background-color: #dddddd">
-      <td>Key</td>   <td>Value</td>
-   </tr>   <tr>
-      <td>networks</td>
-      <td>comma separated list of networks where you will be notfified about this user's online/offline status or undef if you will be notificed on every network you are connected to</td>
-   </tr>   <tr>
-      <td>nick</td>  <td>nickname</td>
-   </tr>   <tr>
-      <td>flags</td> <td>0 = is online</td>
-   </tr>   <tr>
-      <td>on</td> <td>time when user came online</td>
-   </tr>   <tr>
-      <td>off</td>   <td>time when user went offline</td>
-   </tr>   <tr>
-      <td>seen</td>  <td>time when user was last verified still online</td>
-   </tr>
-</table><p>the values indexed by on, off and seen can be passed to localtime
-and gmtime, see perldoc -f <a href="http://perldoc.perl.org/functions/localtime.html">localtime</a> and perldoc -f <a href="http://perldoc.perl.org/functions/gmtime.html">gmtime</a> for more
-detail</p><p>"users"     -  list of users in the current channel</p>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>Key</td>   <td>Value</td>
-   </tr>   <tr>
-      <td>away</td>  <td>away status(boolean)</td>
-   </tr>   <tr>
-      <td>lasttalk</td>
-      <td>last time a user was seen talking, this is the an epoch time(number of seconds since a certain date, that date depends on the OS)</td>
-   </tr>   <tr>
-      <td>nick</td>  <td>nick name</td>
-   </tr>   <tr>
-      <td>host</td>
-      <td>host name in the form: user@host or undef if not known</td>
-   </tr>   <tr>
-      <td>prefix</td>   <td>prefix character, .e.g: @ or +</td>
-   </tr>   <tr>
-      <td>realname</td>
-       <td>Real name or undef</td>
-   </tr>   <tr>
-      <td>selected</td>
-      <td>selected status in the user list, only works when retrieving the user list of the focused tab. You can use the /USELECT command to select the nicks</td>
-   </tr>
-</table><p>"networks"	-	list of networks and the associated settings from network list</p>
-<table border="1">   <tr style="background-color: #dddddd">
-      <td>Key</td>   <td>Value</td>
-   </tr>
-	
-	<tr>
-	<td>autojoins</td> <td>An object with the following methods:<br />
-		<table>
-			<tr>
-				<td>Method</td>
-				<td>Description</td>
-			</tr>			<tr>
-				<td>channels()</td>
-				<td>returns a list of this networks' autojoin channels in list context, a count of the number autojoin channels in scalar context</td>
-			</tr>			<tr>
-				<td>keys()</td>
-				<td>returns a list of the keys to go with the channels, the order is the same as the channels, if a channel doesn't  have a key, '' will be returned in it's place</td>
-			</tr>			<tr>
-				<td>pairs()</td>
-				<td>a combination of channels() and keys(), returns a list of (channels, keys) pairs. This can be assigned to a hash for a mapping from channel to key.</td>
-			</tr>			<tr>
-				<td>as_hash()</td>
-				<td>return the pairs as a hash reference</td>
-			</tr>			<tr>
-				<td>as_string()</td>
-				<td>the original string that was used to construct this autojoin object, this can be used with the JOIN command to join all the channels in the autojoin list</td>
-			</tr>			<tr>
-				<td>as_array()</td>
-				<td>return an array reference of hash references consisting of the keys "channel" and "key"</td>
-			</tr>			<tr>
-				<td>as_bool()</td>
-				<td>returns true if the network has autojoins and false otherwise</td>
-			</tr>
-		</table>
-	</td>
-	</tr>
-   
-	<tr>
-	<td>connect_commands</td> <td>An array reference containing the connect commands for a network. An empty array if there aren't any</td>
-	</tr>	<tr>
-	<td>encoding</td> <td>the encoding for the network</td>
-	</tr>	<tr>
-		<td>flags</td>
-		<td>
-			a hash reference corresponding to the checkboxes in the network edit window
-			<table>
-				<tr>
-					<td>allow_invalid</td>
-					<td>true if "Accept invalid SSL certificate" is checked</td>
-				</tr>				<tr>
-					<td>autoconnect</td>
-					<td>true if "Auto connect to this network at startup" is checked</td>
-				</tr>				<tr>
-					<td>cycle</td>
-					<td>true if "Connect to selected server only" is <strong>NOT</strong> checked</td>
-				</tr>				<tr>
-					<td>use_global</td>
-					<td>true if "Use global user information" is checked</td>
-				</tr>				<tr>
-					<td>use_proxy</td>
-					<td>true if "Bypass proxy server" is <strong>NOT</strong> checked</td>
-				</tr>				<tr>
-					<td>use_ssl</td>
-					<td>true if "Use SSL for all the servers on this network" is checked</td>
-				</tr>
-			</table>
-		</td>
-	</tr>	<tr>
-		<td>irc_nick1</td>
-		<td>Corresponds with the "Nick name" field in the network edit window</td>
-	</tr>	<tr>
-		<td>irc_nick2</td>
-		<td>Corresponds with the "Second choice" field in the network edit window</td>
-	</tr>	<tr>
-		<td>irc_real_name</td>
-		<td>Corresponds with the "Real name" field in the network edit window</td>
-	</tr>	<tr>
-		<td>irc_user_name</td>
-		<td>Corresponds with the "User name" field in the network edit window</td>
-	</tr>	<tr>
-		<td>network</td>
-		<td>Name of the network</td>
-	</tr>	<tr>
-		<td>nickserv_password</td>
-		<td>Corresponds with the "Nickserv password" field in the network edit window</td>
-	</tr>	<tr>
-		<td>selected</td>
-		<td>Index into the list of servers in the "servers" key, this is used if the "cycle" flag is false</td>
-	</tr>	<tr>
-		<td>server_password</td>
-		<td>Corresponds with the "Server password" field in the network edit window</td>
-	</tr>	<tr>
-		<td>servers</td>
-		<td>An array reference of hash references with a "host" and "port" key. If a port is not specified then 6667 will be used.</td>
-	</tr>
-</table><p>
-</p>
-<h3><a name="xchat_user_info" /><code>Xchat::user_info( [$nick] )</code></h3>
-<ul>
-<li><strong><code>$nick</code> -  the nick to look for, if this is not given your own nick will be
-            used as default</strong>
-</li>
-</ul>
-<p>This function is mainly intended to be used as a shortcut for when you need
-to retrieve some information about only one user in a channel. Otherwise it
-is better to use <a href="#xchat_get_list">get_list</a>.
-If <code>$nick</code> is found a hash reference containing the same keys as those in the
-&quot;users&quot; list of <a href="#xchat_get_list">get_list</a> is returned otherwise undef is returned.
-Since it relies on <a href="#xchat_get_list">get_list</a> this function can only be used in a
-channel context.</p>
-<p>
-</p>
-<h3><a name="xchat_context_info" /><code>Xchat::context_info( [$context] )</code></h3>
-<ul>
-<li><strong><code>$context</code> -  context returned from <a href="#xchat_get_context">get_context</a>, <a href="#xchat_find_context">find_context</a> and <a href="#xchat_get_list">get_list</a>, this is the context that you want infomation about. If this is omitted, it will default to current context.</strong>
-</li>
-</ul>
-<p>This function will return the information normally retrieved with <a href="#xchat_get_info">get_info</a>, except this is for the context that is passed in. The information will be returned in the form of a hash. The keys of the hash are the <code>$id</code> you would normally supply to <a href="#xchat_get_info">get_info</a> as well as all the keys that are valid for the items in the &quot;channels&quot; list from <a href="#xchat_get_list">get_list</a>. Use of this function is more efficient than calling get_list( &quot;channels&quot; ) and searching through the result.</p>
-<p>Example:</p>
-<div class="example synNormal"><div class='line_number'>
-<div>1</div>
-<div>2</div>
-<div>3</div>
-<div>4</div>
-<div>5</div>
-<div>6</div>
-<div>7</div>
-<div>8</div>
-<div>9</div>
-<div>10</div>
-<div>11</div>
-</div>
-<div class='content'><pre><span class="synStatement">use strict</span>;
-<span class="synStatement">use warnings</span>;
-<span class="synStatement">use </span>Xchat <span class="synStatement">qw(</span><span class="synConstant">:all</span><span class="synStatement">)</span>; <span class="synComment"># imports all the functions documented on this page</span>
-
-register( <span class="synStatement">&quot;</span><span class="synConstant">User Count</span><span class="synStatement">&quot;</span>, <span class="synStatement">&quot;</span><span class="synConstant">0.1</span><span class="synStatement">&quot;</span>,
-   <span class="synStatement">&quot;</span><span class="synConstant">Print out the number of users on the current channel</span><span class="synStatement">&quot;</span> );
-hook_command( <span class="synStatement">&quot;</span><span class="synConstant">UCOUNT</span><span class="synStatement">&quot;</span>, \<span class="synIdentifier">&amp;display_count</span> );
-<span class="synStatement">sub </span><span class="synIdentifier">display_count </span>{
-   prnt <span class="synStatement">&quot;</span><span class="synConstant">There are </span><span class="synStatement">&quot;</span> . context_info()-&gt;{users} . <span class="synStatement">&quot;</span><span class="synConstant"> users in this channel.</span><span class="synStatement">&quot;</span>;
-   <span class="synStatement">return</span> EAT_XCHAT;
-}
-</pre></div>
-</div><p>
-</p>
-<h3><a name="xchat_strip_code" /><code>Xchat::strip_code( $string )</code></h3>
-<ul>
-<li><strong><code>$string</code>  -  string to remove codes from</strong>
-</li>
-</ul>
-<p>This function will remove bold, color, beep, reset, reverse and underline codes from <code>$string</code>. It will also remove ANSI escape codes which might get used by certain terminal based clients. If it is called in void context <code>$string</code> will be modified otherwise a modified copy of <code>$string</code> is returned.</p>
-<p>
-</p>
-<h2><a name="examples" />Examples</h2>
-<p>
-</p>
-<h3><a name="asynchronous_dns_resolution_with_hook_fd" />Asynchronous DNS resolution with hook_fd</h3>
-<div class="example synNormal"><div class='line_number'>
-<div>1</div>
-<div>2</div>
-<div>3</div>
-<div>4</div>
-<div>5</div>
-<div>6</div>
-<div>7</div>
-<div>8</div>
-<div>9</div>
-<div>10</div>
-<div>11</div>
-<div>12</div>
-<div>13</div>
-<div>14</div>
-<div>15</div>
-<div>16</div>
-<div>17</div>
-<div>18</div>
-<div>19</div>
-<div>20</div>
-<div>21</div>
-<div>22</div>
-<div>23</div>
-<div>24</div>
-<div>25</div>
-<div>26</div>
-<div>27</div>
-<div>28</div>
-<div>29</div>
-<div>30</div>
-<div>31</div>
-<div>32</div>
-<div>33</div>
-<div>34</div>
-<div>35</div>
-</div>
-<div class='content'><pre><span class="synStatement">use strict</span>;
-<span class="synStatement">use warnings</span>;
-<span class="synStatement">use </span>Xchat <span class="synStatement">qw(</span><span class="synConstant">:all</span><span class="synStatement">)</span>;
-<span class="synStatement">use </span>Net::DNS;
-   
-hook_command( <span class="synStatement">&quot;</span><span class="synConstant">BGDNS</span><span class="synStatement">&quot;</span>, <span class="synStatement">sub </span>{
-   <span class="synStatement">my</span> <span class="synIdentifier">$host</span> = <span class="synIdentifier">$_[</span><span class="synConstant">0</span><span class="synIdentifier">][</span><span class="synConstant">1</span><span class="synIdentifier">]</span>;
-   <span class="synStatement">my</span> <span class="synIdentifier">$resolver</span> = Net::DNS::Resolver-&gt;new;
-   <span class="synStatement">my</span> <span class="synIdentifier">$sock</span> = <span class="synIdentifier">$resolver-&gt;bgsend</span>( <span class="synIdentifier">$host</span> );
-   
-   hook_fd( <span class="synIdentifier">$sock</span>, <span class="synStatement">sub </span>{
-      <span class="synStatement">my</span> <span class="synIdentifier">$ready_sock</span> = <span class="synIdentifier">$_[</span><span class="synConstant">0</span><span class="synIdentifier">]</span>;
-      <span class="synStatement">my</span> <span class="synIdentifier">$packet</span> = <span class="synIdentifier">$resolver-&gt;bgread</span>( <span class="synIdentifier">$ready_sock</span> );
-      
-      <span class="synStatement">if</span>( <span class="synIdentifier">$packet-&gt;authority</span> &amp;&amp; (<span class="synStatement">my</span> <span class="synIdentifier">@answers</span> = <span class="synIdentifier">$packet-&gt;answer</span> ) ) {
-         
-         <span class="synStatement">if</span>( <span class="synIdentifier">@answers</span> ) {
-            prnt <span class="synStatement">&quot;</span><span class="synIdentifier">$host</span><span class="synConstant">:</span><span class="synStatement">&quot;</span>;
-            <span class="synStatement">my</span> <span class="synIdentifier">$padding</span> = <span class="synStatement">&quot;</span><span class="synConstant"> </span><span class="synStatement">&quot;</span> x (<span class="synStatement">length</span>( <span class="synIdentifier">$host</span> ) + <span class="synConstant">2</span>);
-            <span class="synStatement">for</span> <span class="synStatement">my</span> <span class="synIdentifier">$answer</span> ( <span class="synIdentifier">@answers</span> ) {
-               prnt <span class="synIdentifier">$padding</span> . <span class="synIdentifier">$answer-&gt;rdatastr</span> . <span class="synStatement">'</span><span class="synConstant"> </span><span class="synStatement">'</span> . <span class="synIdentifier">$answer-&gt;type</span>;
-            }
-         }
-      } <span class="synStatement">else</span> {
-         prnt <span class="synStatement">&quot;</span><span class="synConstant">Unable to resolve </span><span class="synIdentifier">$host</span><span class="synStatement">&quot;</span>;
-      }
-      
-      <span class="synStatement">return</span> REMOVE;
-   },
-   {
-      <span class="synConstant">flags</span> =&gt; FD_READ,
-   });
-   
-   <span class="synStatement">return</span> EAT_XCHAT;
-});
-</pre></div>
-</div>
-
-<p>
-</p>
-<h2><a name="contact_information" />Contact Information</h2>
-<p>Contact Lian Wan Situ at &lt;atmcmnky [at] yahoo.com&gt; for questions, comments and
-corrections about this page or the Perl plugin itself.  You can also find me
-in #xchat on FreeNode under the nick Khisanth.</p>
-<table border="0" width="100%" cellspacing="0" cellpadding="3">
-<tr><td class="block" style="background-color: #cccccc" valign="middle">
-<big><strong><span class="block">&nbsp;X-Chat 2 Perl Interface</span></strong></big>
-</td></tr>
-</table>
-
-</body>
-
-</html>
diff --git a/plugins/perl/hexchat-perldocs.html b/plugins/perl/hexchat-perldocs.html
deleted file mode 100644
index 10d8f314..00000000
--- a/plugins/perl/hexchat-perldocs.html
+++ /dev/null
@@ -1,475 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>XChat - IRC (chat) client for UNIX</title>
-<style type="text/css">
-body{font-family:sans-serif;background-color:#FFFBF0;}
-:link{color:#00C;}
-:visited{color:#609;}
-:active{color:#C00;}
-.date{background-color:#dddddd;font-family:terminal;font-size:small;}
-th,td{font-family:sans-serif;}
-h2{font-family:sans-serif;color:#990066;}
-</style></head>
-
-<body>
-<h1><center>This interface is deprecated</center></h1>
-<table width="90%" cellpadding="0" cellspacing="0" border="0">
-<tbody><tr>
-
-<td align="left" valign="top">
-<blockquote>
-<h2>Xchat Perl Docs</h2>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066">
-Introduction
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>Good Hello!</p>
-<p>The purpose of this page is to give people some quick documentation on the
-things that they will encounter when they try to code scripts for X-Chat.
-It is <strong>not</strong> meant to be a comprehensive programming tutorial,
-by any means.  If that's what you're looking for, then you can just keep on
-looking.</p>
-<p>If you're going to do any scripting with X-Chat at all, you will
-need to know perl.  It also won't hurt to have had experience writing tcl for
-eggdrops or ircII scripts.  Otherwise you're going to have to be very careful
-to avoid creating conditions which could flood you offline or do other
-not-so-optimal things.  ;)  Thankfully, it shouldn't take most intelligent
-people more than a week (month on the outside) enough perl to do some nice
-things in it.
-<a HREF="http://www.perl.com">Perl</a> is a very flexible language.</p>
-<p>You should probably also go read (or at least skim over and then carefully
-bookmark this copy of the thing that defines how IRC works: <a HREF="http://www.irchelp.org/irchelp/rfc1459.html">RFC 1459</a>.
-Other documents that scripters might find useful would be this
-<a HREF="http://www.irchelp.org/irchelp/ircd/numerics.html">nice list of server
-numerics</a>, and this list of <a HREF="http://www.irchelp.org/irchelp/ircd/hybrid6.html">changes
-for Hybrid 6</a> which is something everyone on EFNet should read.  In fact, I
-<strong>strongly</strong> suggest saving copies of these documents to your local
-hard drive, because you <i>will</i> be back to look at them again soon.</p>
-<p>One last thing...  While you may hear that RFC 1459 isn't being followed very
-well, and this is partly true, do your absolute best to stick with RFC-compliant
-behaviours anyway because otherwise there's a good chance that your script will
-never interoperate properly with others, or at least just piss off a lot of other
-people.  <i>Pay special attention to section 2.2 of the RFC.</i></p>
-</blockquote>
-
-<table ALIGN=CENTER WIDTH="75%" CELLPADDING=5 CELLSPACING=0>
-<tr><td ALIGN=CENTER BGCOLOR="#FF7070">
-<font COLOR="#FFFFFF" FACE="Verdana, Helvetica, Arial, Sans"><b>Standard Disclaimer</b>
-</font>
-</td></tr><tr> <td BGCOLOR="#FFCECE" ALIGN=CENTER><font COLOR="#800000" FACE="Helvetica, Lucida, Arial, Sans">
-This documentation is provided on an "as-is" basis and comes with no warranty of accuracy or usefulness, either expressed or implied.  It is subject to change without any notice, and may contain omissions or errors which could cause your genitalia to shrivel and fall off, or spontaneously combust.  If you have any further questions,<br>please feel free to seek professional help.</font>
-</td></tr></table>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-About Handlers
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-There are [currently] four basic ways to make things call the subroutines you write for X-Chat and they are:
-<ul><li>message handlers - Triggered by messagse sent from the IRC server to your client</li>
-<li>command handlers - triggered by / commands typed in by the user at the keyboard</li>
-<li>timeout handlers - triggered by gtk+</li>
-<li>print handlers - triggered just before xchat calls its built in print handlers for events</li></ul>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-About Exit Codes
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-These are very important. Every time you set up a handler, it takes precedent over the built-in functions and commands of X-Chat. That is, whatever thing which triggered your subroutine will go to your code before it goes to X-Chat to be dealt with. In this way you can replace almost every built-in function that the client has with your own routines. The thing to remember is that if your code exits by hitting the end of your subroutine, or by a plain 'return' statement, processing of the event will go on to whatever other things have set up hooks for the event, and then (provided nothing else exits with a return value of 1) to X-Chat itself. There is only one problem with this, (which is solved by the brokering handler that I'll explain that later) and that is that you cannot really control what order the custom routines get called. Normally they will execute in order of which ones were installed first, but a single script has no real way of knowing this. Beware.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-About @_
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-If you've never heard of @_ before, then you've obviously not coded in perl. When a message handler triggers, the raw line from the IRC server is passed to the subroutine you specify in @_. When a command handler is triggered, only the arguments are passed to the routine through @_ and they are not broken into a list, but left as one long string. You'll have to parse those yourself with split. (I advise using s/\s+/ /g to collapse the blank space to single space first.) When a timer handler is triggered, I *think* absolutely nothing is passed in @_, but it's not like anything terrifically important could be passed along anyway. Be especially careful when setting up message handlers for mode changes, since the modes are not broken up into individual events like they are with eggdrop. The upside of this is that X-Chat has no mode hooks of it's own, so you don't have to worry about it too much. (This is not the case with the brokering handler, however.)
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-About Context
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-There are some really nice things about coding for X-Chat, and the biggest one is that it's fairly good about determining the proper context for things. If a server sends something that triggers a message handler, then you can be sure that unless you specify otherwise, that your IRC::print or IRC::command function call will go back to that server and that server alone. If you really really need to know what the current context is, use the IRC::get_info function as detailed below.
-</blockquote>
-
-<hr width="95%">
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-script initialization commands
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::register(scriptname, version, shutdownroutine, unused); 
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>This is the first function your script should call, example:</p>
-<blockquote><p>IRC::register ("my script", "1.0", "", "");</p></blockquote>
-<p>The "shutdownroutine" arg is a function that will be called when X-Chat shuts down, so you get a chance to save config files etc. You can omit this arg, it is optional. The "unused" arg is reserved for future use, for now just provide "". This function also returns X-Chat's version number. </p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-Handler initialization commands
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::add_message_handler(message, subroutine_name);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>This function allows you to set up hooks to subroutines so that when a particular message arrives from the IRC server that you are connected to, it can be passed to a subroutine to be dealt with appropriately. The message argument is essentially the second solid token from the raw line sent by the IRC server, and X-Chat doesn't know that some numeric messages have associated text messages, so for now set up a handler for both if you want to be sure odd servers don't screw up your expectations. (Read: fear IRCNet.) The entire line sent by the IRC server will be passed to your subroutine in @_. For the completely uninitiated, messages are things like 'PRIVMSG', 'NOTICE', '372', etc.</p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::add_command_handler(command, subroutine_name);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>This function allows you to set up hooks for actual commands that the user can type into the text window. The arguments are passed to the subroutine via @_, and arrive as a single string. @_ will be null if no arguments are supplied. It's recommended that you be sure and collapse the excess whitespace with s/\s+/ /g before attempting to chop the line up with split. As mentioned earlier, exiting with an undefined return value will allow the command to be parsed by other handlers, while using a return value of 1 will signal the program that no further parsing needs to be done with this command.</p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::add_timeout_handler(interval, subroutine_name);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>This function allows you to set up hooks for subroutines to be called at a particular interval. The interval is measured in milliseconds, so don't use a particularly small value unless you wish to drive the CPU load through the roof. 1000ms = 1 second. No values will be passed to the routine via @_ and return values don't affect anything either.</p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::add_print_handler(message, subroutine_name);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>This function allows you to catch the system messages (those who generally start by three stars) and to execute a function each time an event appear. The events are those you can see in "Settings->Edit Events Texts". message is the name of the event (you can find it in the Edit Events box, "Events" column) , subroutine_name is the name of the function that will get messages. Be carrful: all the arguments are sent to function in $_[0] separated by spaces. </p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-Output commands
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::print(text);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This is a very simple routine. All it does is put the contents of the text string to the current window. The current window will be whichever window a command was typed into when called from a command handler, or in whichever window the message command is appropriate to if it is called from within a message handler. As with any perl program, newlines are not assumed, so don't forget to end the line with \n if you don't want things to look screwey.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::print_with_channel( text, channelname, servername );
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This routine does the same thing as IRC::Print does, except it allows you to direct the output to a specific window. It returns 1 on success, 0 on fail.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::command(text);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This routine allows you to execute commands in the current context. The text string containing the command will be parsed by everything that would normally parse a command, including your own command handlers, so be careful. Newlines are assumed, thankfully.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::command_with_server(text, servername);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This routine allows you to specify the context of the server for which the command will be executed. It's not particularly useful unless you're managing a connection manually, yet the command still exists for it's usefulness in doing things like managing a bnc connection, etc. Newlines are assumed here as well.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::send_raw(text);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This routine is very useful in that it allows you to send a string directly to the IRC server you are connected to. It is assumed that the server will be the one you first connected to if there is no clear context for the command, otherwise it will go to whatever server triggered the message handler or command handler window. You must specify newlines here always or you can be guaranteed that strange things will happen. The text message you specify should be a proper RAW IRC message, so don't play with it if you don't know how to do these. Additionally, while newlines are also not assumed here as with the IRC::print function, the RFC specifies that newlines are a CR+LF pair, even if most servers will accept a mere newline. It's best to play it safe and use \r\n instead of just \n.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-Information retrieval commands
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::get_info(integer);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This function returns a bit of selected information depending on what the value of the integer is.
-Here's a list of the currently supported values:
-<ul><li>0 - xchat version</li>
-<li>1 - your nickname</li>
-<li>2 - channel</li>
-<li>3 - server</li>
-<li>4 - xchatdir</li>
-<li>5 - away status</li>
-<li>6 - network name</li>
-<li>7 - server hostname</li>
-<li>8 - channel topic</li></ul>
-<p>If you are requesting information that isn't available in the current context, then it will return null.</p>
-<p>Any numbers other than the above will return an error message.</p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::get_prefs(var);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This command lets you read the preferences that are set in the xchat configuration file. Just look at the xchat.conf dir to see what variables are available to use with this command. Returns the value of the variable requested or "Unknown Variable" if the variable isn't available.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::user_info( nickname );
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-Returns a flat list of information on the nickname specified consisting of... nickname, nick host, and whether they have op or voice in the current context.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::channel_list( );
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This command returns a flat list which contains the current channel, server, and nickname for all channels the client is currently in. You'll have to break the list up into groups of three yourself. No arguments are necessary, or used [currently].
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::server_list( );
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This command returns a flat list of servers. (Note, it is incompatible with xchat 1.8 in that it also returns a list of servers you are NOT connected to as well.)
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::user_list(channel, server);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>Works very much like the dcc_list command below, except that is returns information about the users on the channel provided as first argument. The second argument is the server and is optional.</p>
-<p>NOTE: If a user has both op and voice, only the op flag will be set to 1 by this command in xchat2.</p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::user_list_short(channel, server);
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-<p>A simpler version of IRC::user_list that returns pairs of nick & user@host suitable for assigning to a hash.</p>
-<p>NOTE: If a user has both op and voice, only the op flag will be set to 1 by this command in xchat2.</p>
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::dcc_list( );
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This command does essentially the same thing as channel_list, giving you the details of each DCC connection currently in progress. I have no idea exactly what is returned because I haven't had a chance to poke at this one much, but suffice it to say that it's a flat list, and the first time you play with it the meaning of the returned values should be pretty obvious.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial">
-IRC::ignore_list( );
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-This command returns a flat list of the contents of your ignore list. You'll have to play with it a little as I have not had a chance to yet. Works basically the same as the other list commands.
-</blockquote>
-
-<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
-<tbody><tr><td bgcolor="#000000">
-<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
-<td width="20%" align="left" bgcolor="#dddddd">
-<font face="Lucida, Helvetica, Arial" color="#990066;">
-Unimplemented commands that were available in xchat 1.8.x
-</font></td>
-</tr></tbody></table>
-</td></tr></tbody></table>
-
-<blockquote>
-add_user_list , sub_user_list , clear_user_list, notify_list were available in xchat 1.8.x but are not implemented in xchat 2 at this time.
-</blockquote>
-
-</blockquote>
-</td>
-</tr>
-</tbody></table>
-<br><hr>
-<font size="-10">This document originally written by Dagmar d'Surreal on March 26th, 1998 for xchat 1.4<br>
-Updated on July 30th, 1999 by Peter Zelezny<br>
-Updated on May 16th, 2003 by DaNumber8 to comply with the perl plugin for xchat2 version 2.0.3</font>
-</body></html>
diff --git a/plugins/plugin20.html b/plugins/plugin20.html
deleted file mode 100644
index e17f3346..00000000
--- a/plugins/plugin20.html
+++ /dev/null
@@ -1,1141 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>HexChat 2 Plugin Interface</title>
-<style type="text/css">
-<!--
-body {
-font-family: sans-serif;
-background-color: #FFFBF0;
-}
-.cmd {
-background-color: #dddddd;
-color: #990066
-}
-.bbox {
-font-family: monospace;
-color: #fdfdfd;
-background-color: #000;
-border: 1px solid #00f;
-padding: 4px;
-text-align: left;
-margin-left: 32px;
-margin-right: 32px;
-}
-.box {
-background-color: #ddddee;
-border: 1px solid #000;
-padding: 4px;
-text-align: left;
-margin-left: 32px;
-margin-right: 32px;
-}
--->
-</style>
-</head>
-<body bgcolor="#FFFBF0" text="#000" link="#607060" vlink="#607060" alink="#607060">
-
-<h1>HexChat 2 Plugin Interface</h1>
-
-<small>
-<font size="-12">plugin20.html revision 2.9.1</font>
-<br>Latest version of this document is available at: <a href="https://github.com/hexchat/hexchat/wiki/Plugins">https://github.com/hexchat/hexchat/wiki/Plugins</a></small>
-
-<h2>1. Documentation:</h2>
-<blockquote>
-<a href="#intro">1.0 Introduction</a>
-<br><a href="#sample">1.1 Sample plugin</a>
-<br><a href="#word">1.2 What is word and word_eol?</a>
-<br><a href="#lists">1.3 Lists and fields</a>
-<br><a href="#win32">1.4 Plugins on Windows (Win32)</a>
-<br><a href="#gui">1.5 Controlling the GUI</a>
-<br>&nbsp; <a href="#gui">1.5.1 Basic Control</a>
-<br>&nbsp; <a href="#menu">1.5.2 Custom Menu Items</a>
-<br>&nbsp; <a href="#tray">1.5.3 System Tray</a>
-<br><a href="#unicode">1.6 Handling UTF-8/Unicode strings</a>
-</blockquote>
-
-<h2>2. Function reference:</h2>
-<blockquote>
-<a href="#xchat_hook_command">xchat_hook_command</a>
-<br><a href="#xchat_hook_fd">xchat_hook_fd</a>
-<br><a href="#xchat_hook_print">xchat_hook_print</a>
-<br><a href="#xchat_hook_server">xchat_hook_server</a>
-<br><a href="#xchat_hook_timer">xchat_hook_timer</a>
-<br><a href="#xchat_unhook">xchat_unhook</a>
-<br>
-<br><a href="#xchat_command">xchat_command</a>
-<br><a href="#xchat_commandf">xchat_commandf</a>
-<br><a href="#xchat_print">xchat_print</a>
-<br><a href="#xchat_printf">xchat_printf</a>
-<br><a href="#xchat_emit_print">xchat_emit_print</a>
-<br><a href="#xchat_send_modes">xchat_send_modes</a>
-<br>
-<br><a href="#xchat_find_context">xchat_find_context</a>
-<br><a href="#xchat_get_context">xchat_get_context</a>
-<br><a href="#xchat_get_info">xchat_get_info</a>
-<br><a href="#xchat_get_prefs">xchat_get_prefs</a>
-<br><a href="#xchat_set_context">xchat_set_context</a>
-<br>
-<br><a href="#xchat_nickcmp">xchat_nickcmp</a>
-<br><a href="#xchat_strip">xchat_strip</a>
-<br><a href="#xchat_free">xchat_free</a>
-<br>
-<br><a href="#xchat_pluginpref_set_str">xchat_pluginpref_set_str</a>
-<br><a href="#xchat_pluginpref_get_str">xchat_pluginpref_get_str</a>
-<br><a href="#xchat_pluginpref_set_int">xchat_pluginpref_set_int</a>
-<br><a href="#xchat_pluginpref_get_int">xchat_pluginpref_get_int</a>
-<br><a href="#xchat_pluginpref_delete">xchat_pluginpref_delete</a>
-<br><a href="#xchat_pluginpref_list">xchat_pluginpref_list</a>
-<br>
-<br><a href="#lists">xchat_list_get</a>
-<br><a href="#lists">xchat_list_free</a>
-<br><a href="#lists">xchat_list_fields</a> (not documented yet)
-<br><a href="#lists">xchat_list_next</a>
-<br><a href="#lists">xchat_list_str</a>
-<br><a href="#lists">xchat_list_int</a>
-<br><a href="#lists">xchat_list_time</a>
-<br>
-<br><a href="#xchat_plugingui_add">xchat_plugingui_add</a> (not documented yet)
-<br><a href="#xchat_plugingui_remove">xchat_plugingui_remove</a> (not documented yet)
-</blockquote><br>
-
-<h3><a name=intro>Introduction</a></h3>
-Plugins for HexChat are written in C. The interface aims to keep 100%
-binary compatability. This means that if you upgrade HexChat, you will
-not need to recompile your plugins, they'll continue to work. The
-interface doesn't depend on any structures and offsets, so compiler
-versions shouldn't have an impact either. The only real requirement of
-an HexChat plugin, is that it define a "xchat_plugin_init" symbol. This
-is your entry point function, see the example below. You should make
-all your global variables and functions <i>static</i>, so that a symbol
-is not exported. There is no harm in exporting these symbols, but they
-are not necessary and only pollute the name-space. Plugins are compiled as shared objects
-(.so files), for example:
-<br><br>
-Most UNIX systems:<pre>
-	gcc -Wl,--export-dynamic -Wall -O1 -shared -fPIC myplugin.c -o myplugin.so
-</pre>
-MacOSX:<pre>
-	gcc -no-cpp-precomp -g -O2 -Wall -bundle -flat_namespace -undefined suppress -o myplugin.so myplugin.c
-</pre>
-
-See the <a href="#win32">Windows section</a> on how to compile a plugin
-using visual studio.
-<p>
-All strings passed to and from plugins are encoded in UTF-8, regardless
-of locale. <a href="#unicode">What does this mean</a>?
-</p><br>
-
-<h3><a name=sample>Sample plugin</a></h3>
-This simple plugin autoOps anyone who joins a channel you're in. It also
-adds a new command /AUTOOPTOGGLE, which can be used to turn the feature ON
-or OFF. Every HexChat plugin must define an xchat_plugin_init function, this
-is the normal entry point. xchat_plugin_deinit is optional.
-<br>
-<div style="color: #ffffff; background-color: #111199;">
-<pre>
-
-<font color="#00ff00">#include </font><font color="#00ffff">&quot;xchat-plugin.h&quot;</font>
-
-<font color="#00ff00">#define PNAME </font><font color="#00ffff">&quot;AutoOp&quot;</font>
-<font color="#00ff00">#define PDESC </font><font color="#00ffff">&quot;Auto Ops anyone that joins&quot;</font>
-<font color="#00ff00">#define PVERSION </font><font color="#00ffff">&quot;0.1&quot;</font>
-
-<font color="#ffa500"><b>static</b></font> hexchat_plugin *ph;   <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> plugin handle </b></font><font color="#bebebe"><b>*/</b></font>
-<font color="#ffa500"><b>static</b></font> <font color="#ffa500"><b>int</b></font> enable = <font color="#00ffff">1</font>;
-
-<font color="#ffa500"><b>static</b></font> <font color="#ffa500"><b>int</b></font> join_cb(<font color="#ffa500"><b>char</b></font> *word[], <font color="#ffa500"><b>void</b></font> *userdata)
-{
-   <font color="#ffff00">if</font> (enable)
-      <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> Op ANYONE who joins </b></font><font color="#bebebe"><b>*/</b></font>
-      xchat_commandf(ph, <font color="#00ffff">&quot;OP </font><font color="#ff00ff">%s</font><font color="#00ffff">&quot;</font>, word[<font color="#00ffff">1</font>]);
-   <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> word[1] is the nickname, as in the Settings-&gt;Advanced-&gt;TextEvents window in xchat </b></font><font color="#bebebe"><b>*/</b></font>
-
-   <font color="#ffff00">return</font> XCHAT_EAT_NONE;  <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> don't eat this event, HexChat needs to see it! </b></font><font color="#bebebe"><b>*/</b></font>
-}
-
-<font color="#ffa500"><b>static</b></font> <font color="#ffa500"><b>int</b></font> autooptoggle_cb(<font color="#ffa500"><b>char</b></font> *word[], <font color="#ffa500"><b>char</b></font> *word_eol[], <font color="#ffa500"><b>void</b></font> *userdata)
-{
-   <font color="#ffff00">if</font> (!enable)
-   {
-      enable = <font color="#00ffff">1</font>;
-      xchat_print(ph, <font color="#00ffff">&quot;AutoOping now enabled!</font><font color="#ff00ff">\n</font><font color="#00ffff">&quot;</font>);
-   } <font color="#ffff00">else</font>
-   {
-      enable = <font color="#00ffff">0</font>;
-      xchat_print(ph, <font color="#00ffff">&quot;AutoOping now disabled!</font><font color="#ff00ff">\n</font><font color="#00ffff">&quot;</font>);
-   }
-
-   <font color="#ffff00">return</font> XCHAT_EAT_ALL;   <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> eat this command so HexChat and other plugins can't process it </b></font><font color="#bebebe"><b>*/</b></font>
-}
-
-<font color="#ffa500"><b>void</b></font> xchat_plugin_get_info(<font color="#ffa500"><b>char</b></font> **name, <font color="#ffa500"><b>char</b></font> **desc, <font color="#ffa500"><b>char</b></font> **version, <font color="#ffa500"><b>void</b></font> **reserved)
-{
-   *name = PNAME;
-   *desc = PDESC;
-   *version = PVERSION;
-}
-
-<font color="#ffa500"><b>int</b></font> xchat_plugin_init(xchat_plugin *plugin_handle,
-                      <font color="#ffa500"><b>char</b></font> **plugin_name,
-                      <font color="#ffa500"><b>char</b></font> **plugin_desc,
-                      <font color="#ffa500"><b>char</b></font> **plugin_version,
-                      <font color="#ffa500"><b>char</b></font> *arg)
-{
-   <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> we need to save this for use with any xchat_* functions </b></font><font color="#bebebe"><b>*/</b></font>
-   ph = plugin_handle;
-
-   <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> tell HexChat our info </b></font><font color="#bebebe"><b>*/</b></font>
-   *plugin_name = PNAME;
-   *plugin_desc = PDESC;
-   *plugin_version = PVERSION;
-
-   xchat_hook_command(ph, <font color="#00ffff">&quot;AutoOpToggle&quot;</font>, XCHAT_PRI_NORM, autooptoggle_cb, <font color="#00ffff">&quot;Usage: AUTOOPTOGGLE, Turns OFF/ON Auto Oping&quot;</font>, <font color="#00ffff">0</font>);
-   xchat_hook_print(ph, <font color="#00ffff">&quot;Join&quot;</font>, XCHAT_PRI_NORM, join_cb, <font color="#00ffff">0</font>);
-
-   xchat_print(ph, <font color="#00ffff">&quot;AutoOpPlugin loaded successfully!</font><font color="#ff00ff">\n</font><font color="#00ffff">&quot;</font>);
-
-   <font color="#ffff00">return</font> <font color="#00ffff">1</font>;       <font color="#bebebe"><b>/*</b></font><font color="#bebebe"><b> return 1 for success </b></font><font color="#bebebe"><b>*/</b></font>
-}
-
-</pre>
-</div>
-
-<h3><a name=word>What's word and word_eol?</a></h3>
-
-They are arrays of strings. They contain the parameters the user entered
-for the particular command. For example, if you executed:
-
-<pre>
-/command NICK hi there
-
-word[1] is command
-word[2] is NICK
-word[3] is hi
-word[4] is there
-
-word_eol[1] is command NICK hi there
-word_eol[2] is NICK hi there
-word_eol[3] is hi there
-word_eol[4] is there
-</pre>
-These arrays are simply provided for your convenience. You are NOT allowed
-to alter them. Both arrays are limited to 32 elements (index 31). word[0] and
-word_eol[0] are reserved and should not be read.
-<br><br><br>
-<h3><a name=lists>Lists and Fields</a></h3>
-Lists of information (DCCs, Channels, Userlist etc) can be retreived
-with xchat_list_get. All fields are READ ONLY and must be copied if
-needed for a long time after calling xchat_list_str. The types of lists and fields available are:
-<blockquote>
-
-"channels" - list of channels, querys and their servers.
-<blockquote><table border=1>
-<tr bgcolor="#dddddd"><td>Name</td><td>Description</td><td>Type</td></tr>
-<tr><td>channel</td><td>Channel or query name</td><td>string</td></tr>
-<tr><td>chantypes</td><td>Channel types e.g. "#!&amp;"<br><small>(Added in version 2.0.9. Older versions will return NULL)</small></td><td>string</td>
-<tr><td>context</td><td>(xchat_context *) pointer. Can be used with xchat_set_context</td><td>string</td></tr>
-<tr><td>flags</td><td>Server/Channel Bits:<br>
-<table>
-<tr><td>Bit #</td><td>Value</td><td>Description</td></tr>
-<tr><td>0</td><td>1</td><td>Connected</td></tr>
-<tr><td>1</td><td>2</td><td>Connecting in Progress</td></tr>
-<tr><td>2</td><td>4</td><td>You are away</td></tr>
-<tr><td>3</td><td>8</td><td>End of MOTD (Login complete)</td></tr>
-<tr><td>4</td><td>16</td><td>Has WHOX (ircu)</td></tr>
-<tr><td>5</td><td>32</td><td>Has IDMSG (FreeNode)</td></tr>
-<tr><td>6</td><td>64</td><td>Hide Join/Part Messages</td></tr>
-<tr><td>7</td><td>128</td><td>unused (was Color Paste in old versions)</td></tr>
-<tr><td>8</td><td>256</td><td>Beep on Message</td></tr>
-<tr><td>9</td><td>512</td><td>Blink Tray</td></tr>
-<tr><td>10</td><td>1024</td><td>Blink Task Bar</td></tr>
-</table>
-<br><small>(Bits 0-5 added in 2.0.9. Bits 6-8 added in 2.6.6. Bit 9 added in 2.8.0. Bit 10 in 2.8.6)</small></td><td>int</td></tr>
-<tr><td>id</td><td>Unique server ID<br><small>(Added in version 2.0.8. Older versions will return -1)</small></td><td>int</td></tr>
-<tr><td>lag</td><td>Lag in milliseconds<br><small>(Added in version 2.6.8. Older versions will return -1)</small></td><td>int</td>
-<tr><td>maxmodes</td><td>Maximum modes per line<br><small>(Added in version 2.0.9. Older versions will return -1)</small></td><td>int</td>
-<tr><td>network</td><td>Network name to which this channel belongs<br><small>(Added in version 2.0.2. Older versions will return NULL)</small></td><td>string</td></tr>
-<tr><td>nickprefixes</td><td>Nickname prefixes e.g. "@+"<br><small>(Added in version 2.0.9. Older versions will return NULL)</small></td><td>string</td>
-<tr><td>nickmodes</td><td>Nickname mode chars e.g. "ov"<br><small>(Added in version 2.0.9. Older versions will return NULL)</small></td><td>string</td>
-<tr><td>queue</td><td>Number of bytes in the send-queue<br><small>(Added in version 2.6.8. Older versions will return -1)</small></td><td>int</td>
-<tr><td>server</td><td>Server name to which this channel belongs</td><td>string</td></tr>
-<tr><td>type</td><td>Type of context this is: 1-Server 2-Channel 3-Dialog<br><small>(Added in version 2.0.2. Older versions will return -1)</small></td><td>int</td></tr>
-<tr><td>users</td><td>Number of users in this channel<br><small>(Added in version 2.0.8. Older versions will return -1)</small></td><td>int</td></tr>
-</table>
-</blockquote>
-
-"dcc" - list of DCC file transfers. Fields:
-<blockquote> <table border=1>
-<tr bgcolor="#dddddd"><td>Name</td><td>Description</td><td>Type</td></tr>
-<tr><td>address32</td><td>Address of the remote user (ipv4 address)</td><td>int</td></tr>
-<tr><td>cps</td><td>Bytes per second (speed)</td><td>int</td></tr>
-<tr><td>destfile</td><td>Destination full pathname</td><td>string</td></tr>
-<tr><td>file</td><td>File name</td><td>string</td></tr>
-<tr><td>nick</td><td>Nickname of person who the file is from/to</td><td>string</td></tr>
-<tr><td>port</td><td>TCP port number</td><td>int</td></tr>
-<tr><td>pos</td><td>Bytes sent/received</td><td>int</td></tr>
-<tr><td>poshigh</td><td>Bytes sent/received, high order 32 bits</td><td>int</td></tr>
-<tr><td>resume</td><td>Point at which this file was resumed (or zero if it was not resumed)</td><td>int</td></tr>
-<tr><td>resumehigh</td><td>Point at which this file was resumed, high order 32 bits</td><td>int</td></tr>
-<tr><td>size</td><td>File size in bytes, low order 32 bits (cast it to unsigned)</td><td>int</td></tr>
-<tr><td>sizehigh</td><td>File size in bytes, high order 32 bits</td><td>int</td></tr>
-<tr><td>status</td><td>DCC Status: 0-Queued 1-Active 2-Failed 3-Done 4-Connecting 5-Aborted</td><td>int</td></tr>
-<tr><td>type</td><td>DCC Type: 0-Send 1-Receive 2-ChatRecv 3-ChatSend</td><td>int</td></tr>
-</table>
-</blockquote>
-
-"ignore" - current ignore list.
-<blockquote> <table border=1>
-<tr bgcolor="#dddddd"><td>Name</td><td>Description</td><td>Type</td></tr>
-<tr><td>mask</td><td>Ignore mask. .e.g: *!*@*.aol.com</td><td>string</td></tr>
-<tr><td>flags</td><td>Bit field of flags. 0=Private 1=Notice 2=Channel 3=Ctcp<br>
-4=Invite 5=UnIgnore 6=NoSave 7=DCC</td><td>int</td></tr>
-</table>
-</blockquote>
-
-"notify" - list of people on notify.
-<blockquote> <table border=1>
-<tr bgcolor="#dddddd"><td>Name</td><td>Description</td><td>Type</td></tr>
-<tr><td>networks</td><td>Networks to which this nick applies. Comma separated. May be NULL.
-<br><small>(Added in version 2.6.8)</small></td><td>string</td></tr>
-<tr><td>nick</td><td>Nickname</td><td>string</td></tr>
-<tr><td>flags</td><td>Bit field of flags. 0=Is online.</td><td>int</td></tr>
-<tr><td>on</td><td>Time when user came online.</td><td>time_t</td></tr>
-<tr><td>off</td><td>Time when user went offline.</td><td>time_t</td></tr>
-<tr><td>seen</td><td>Time when user the user was last verified still online.</td><td>time_t</td></tr>
-</table>
-<small>The entire "notify" list was added in xchat 2.0.8. Fields are
-only valid for the context when xchat_list_get() was called
-(i.e. you get information about the user ON THAT ONE SERVER ONLY). You
-may cycle through the "channels" list to find notify information for every
-server.</small>
-</blockquote>
-
-"users" - list of users in the current channel.
-<blockquote> <table border=1>
-<tr bgcolor="#dddddd"><td>Name</td><td>Description</td><td>Type</td></tr>
-<tr><td>away</td><td>Away status (boolean)<br><small>(Added in version 2.0.6. Older versions will return -1)</small></td><td>int</td></tr>
-<tr><td>lasttalk</td><td>Last time the user was seen talking<br><small>(Added in version 2.4.2. Older versions will return -1)</small></td><td>time_t</td></tr>
-<tr><td>nick</td><td>Nick name</td><td>string</td></tr>
-<tr><td>host</td><td>Host name in the form: user@host (or NULL if not known).</td><td>string</td></tr>
-<tr><td>prefix</td><td>Prefix character, .e.g: @ or +. Points to a single char.</td><td>string</td></tr>
-<tr><td>realname</td><td>Real name or NULL<br><small>(Added in version 2.8.6)</small></td><td>string</td></tr>
-<tr><td>selected</td><td>Selected status in the user list, only works for retrieving the user list of the focused tab<br><small>(Added in version 2.6.1. Older versions will return -1)</small></td><td>int</td></tr>
-</table>
-</blockquote>
-
-</blockquote>
-
-Example:
-<br>
-<pre>
-   list = xchat_list_get(ph, <font color="#f800f8">&quot;dcc&quot;</font>);
-   <font color="#a02828"><b>if</b></font>(list)
-   {
-      xchat_print(ph, <font color="#f800f8">&quot;--- DCC LIST ------------------</font><font color="#6858c8">\n</font><font color="#f800f8">&quot;</font>
-                      <font color="#f800f8">&quot;File  To/From   KB/s   Position</font><font color="#6858c8">\n</font><font color="#f800f8">&quot;</font>);
-
-      <font color="#a02828"><b>while</b></font>(xchat_list_next(ph, list))
-      {
-         xchat_printf(ph, <font color="#f800f8">&quot;</font><font color="#6858c8">%6s</font><font color="#f800f8"> </font><font color="#6858c8">%10s</font><font color="#f800f8"> </font><font color="#6858c8">%.2f</font><font color="#f800f8">  </font><font color="#6858c8">%d</font><font color="#6858c8">\n</font><font color="#f800f8">&quot;</font>,
-             xchat_list_str(ph, list, <font color="#f800f8">&quot;file&quot;</font>),
-             xchat_list_str(ph, list, <font color="#f800f8">&quot;nick&quot;</font>),
-             xchat_list_int(ph, list, <font color="#f800f8">&quot;cps&quot;</font>) / <font color="#f800f8">1024</font>,
-             xchat_list_int(ph, list, <font color="#f800f8">&quot;pos&quot;</font>));
-      }
-
-      xchat_list_free(ph, list);
-   }
-</pre>
-
-<br>
-
-<h3><a name=win32>Plugins on Windows (Win32)</a></h3>
-Yes, it can be done. All you need is either
-<a href="http://msdn.microsoft.com/visualc/vctoolkit2003/">MSVC</a> (Visual Studio) or
-<a href="http://www.mingw.org">MINGW</a>, both these compilers are free to download.
-Simply compile your plugin as a DLL. You should have the following files:
-
-<ul>
-<li><a href="https://github.com/hexchat/hexchat/blob/master/plugins/hexchat-plugin.h">hexchat-plugin.h</a> - Main Plugin header</li>
-<li>plugin.c - Your plugin, you need to write this one :)</li>
-<li>plugin.def - A simple text file containing the following:</li>
-</ul>
-<div class=box>
-EXPORTS<br>
-&nbsp; xchat_plugin_init<br>
-&nbsp; xchat_plugin_deinit<br>
-&nbsp; xchat_plugin_get_info<br>
-</div>
-
-<br>Leave out <i>xchat_plugin_deinit</i> if you don't intend to define that
-function. Then, to compile, type this at your command prompt:<br><br>
-<div class=bbox>
-<font color="#00FF00">MSVC</font>
-<br>&nbsp;cl -O1 -MD -G5 -DWIN32 -c plugin.c<br>
-<br>&nbsp;link /DLL /out:plugin.dll /SUBSYSTEM:WINDOWS plugin.obj /def:plugin.def /base:0x00d40000
-<br><br>
-<font color="#00FF00">GCC (MINGW)</font>
-<br>&nbsp;gcc -Wall -Os -DWIN32 -c plugin.c<br>
-<br>&nbsp;dllwrap --def plugin.def --dllname plugin.dll plugin.o<br><br>
-</div>
-<br>For a complete example, have a look at the source code of the <a href="http://xchat.org/win32/testing/xcdns-src.zip">DNS Plugin</a>, which also contains a Makefile.
-<br><br>
-<font color=red>Caveat:</font> Plugins compiled on Win32 MUST have a
-global variable called <b>ph</b>, which is the plugin_handle, much like
-in the <a href="#sample">sample plugin</a> above.
-<br><br>
-
-<h3><a name=gui>Controlling the GUI</a></h3>
-<p>
-A simple way to perform basic GUI functions is to use the /GUI command.
-You can execute this command through the input-box, or by calling
-xchat_command(ph, "GUI .....");.
-</p>
-<blockquote>
-	<table border=0 cellpadding=4>
-	<tr><td>GUI ATTACH</td><td>Same function as "Attach Window" in the HexChat menu (new for 2.6.2).</td></tr>
-	<tr><td>GUI DETACH</td><td>Same function as "Detach Tab" in the HexChat menu (new for 2.6.2).</td></tr>
-	<tr><td>GUI APPLY</td><td>Similar to clicking OK in the settings window. Execute this after /SET to activate GUI changes (new for 2.8.0)</td></tr>
-	<tr><td>GUI COLOR <i>n</i></td><td>Change the tab color of the current context, where n is a number from 0 to 3.</td></tr>
-	<tr><td>GUI FOCUS</td><td>Focus the current window or tab.</td></tr>
-	<tr><td>GUI FLASH</td><td>Flash the taskbar button. It will flash only if the window isn't focused and will stop when it is focused by the user.</td></tr>
-	<tr><td>GUI HIDE</td><td>Hide the main HexChat window completely (this is used by the Systray plugin).</td></tr>
-	<tr><td>GUI ICONIFY</td><td>Iconify (minimize to taskbar) the current HexChat window.</td></tr>
-	<tr><td>GUI MSGBOX <i>text</i></td><td>Displays a asynchronous message box with your text (new for 2.4.5).</td></tr>
-	<tr><td>GUI SHOW</td><td>Show the main HexChat window (if currently hidden).</td></tr>
-	</table>
-</blockquote>
-<p>
-Note, the FLASH, ICONIFY and COLOR args were added in xchat 2.0.8, they
-will not work with previous versions.
-</p>
-<a name=menu>Starting from 2.4.5 you can add your own items to the menu bar. The menu command has this syntax</a>:
-<pre>
-	MENU [-eX] [-i&lt;ICONFILE>] [-k&lt;mod>,&lt;key>] [-m] [-pX] [-rX,group] [-tX] {ADD|DEL} &lt;path> [command] [unselect command]</pre>
-For example:
-<pre>
-	MENU -p5 ADD FServe
-	MENU ADD "FServe/Show File List" "fs list"
-	MENU ADD FServe/-
-	MENU -k4,101 -t1 ADD "FServe/Enabled" "fs on" "fs off"
-	MENU -e0 ADD "FServe/Do Something" "fs action"
-</pre>
-In the example above, it would be recommended to execute "MENU DEL FServe" inside your xchat_plugin_deinit function. The special item with name "-" will add a separator line.
-<br><br>
-Parameters and flags:
-<blockquote>
-<table border=1 cellpadding=4 rules=all>
-<tr><td>-eX</td><td>Set enable flag to X. -e0 for disable, -e1 for enable. This lets you create a disabled (shaded) item.</td></tr>
-<tr><td>-iFILE</td><td>Use an icon filename FILE (new for 2.8.0). Not supported for toggles or radio items.</td></tr>
-<tr><td>-k&lt;mod>,&lt;key></td><td>Specify a keyboard shortcut. "mod" is the modifier which is a bitwise OR of: 1-SHIFT 4-CTRL 8-ALT in decimal. "key" is the key value in decimal, e.g. -k5,101 would specify SHIFT-CTRL-E.</td></tr>
-<tr><td>-m</td><td>Specify that this label should be treated as <a href="http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html">Pango Markup</a> language. Since forward slash ("/") is already used in menu paths, you should replace closing tags with an ASCII 003 instead e.g.: xchat_command(ph, "MENU -m ADD \"&lt;b>Bold Menu&lt;\003b>\""); (new for 2.6.6).</td></tr>
-<tr><td>-pX</td><td>Specify a menu item's position number. e.g. -p5 will cause the item to be inserted in the 5th place. New for 2.8.0: If the position is a negative number, it will be used as an offset from the bottom/right-most item.</td></tr>
-<tr><td>-rX,group</td><td>Specify a radio menu item, with initial state X and a group name (new for 2.8.0). The group name should be the exact label of another menu item (without the path) that this item will be grouped with. For radio items, only a select command will be executed (no unselect command).</td></tr>
-<tr><td>-tX</td><td>Specify a toggle menu item with an initial state. -t0 for an "unticked" item and -t1 for a "ticked" item.</td></tr>
-</table>
-</blockquote>
-
-If you want to change an item's toggle state or enabled flag,
-just ADD an item with exactly the same name and command and specify the -tX -eX parameters you need.
-<br><br>It's also possible to add items to HexChat's existing menus, for example:<br>
-<pre>	MENU ADD "Settings/Sub Menu"
-	MENU -t0 ADD "Settings/Sub Menu/My Setting" myseton mysetoff
-</pre>
-However, internal names and layouts of HexChat's menu may change in the future, so use at own risk.
-<br><br>
-Here is an example of Radio items:
-<pre>	MENU ADD "Language"
-	MENU -r1,"English" ADD "Language/English" cmd1
-	MENU -r0,"English" ADD "Language/Spanish" cmd2
-	MENU -r0,"English" ADD "Language/German" cmd3</pre>
-<br>
-From 2.8.0, you can also change menus other than the main one (i.e popup menus). Currently they are:
-<blockquote>
-<table border=1 cellpadding=4 rules=all>
-<tr bgcolor="#999999"><td>Root Name</td><td>Menu</td></tr>
-<tr><td>$TAB</td><td>Tab menu (right click a channel/query tab or treeview row)</td></tr>
-<tr><td>$TRAY</td><td>System Tray menu</td></tr>
-<tr><td>$URL</td><td>URL link menu</td></tr>
-<tr><td>$NICK</td><td>Userlist nick-name popup menu</td></tr>
-<tr><td>$CHAN</td><td>Menu when clicking a channel in the text area (since 2.8.4)</td></tr>
-
-</table>
-</blockquote>
-<pre>
-	Example: MENU -p0 ADD "$TAB/Cycle Channel" cycle
-</pre>
-
-<br>
-<a name=tray>Starting from 2.8.0 you can manipulate HexChat's system tray icon using the /TRAY command</a>:
-<pre>
- Usage: 
- TRAY -f &lt;timeout> &lt;file1> [&lt;file2>] Flash tray between two icons. Leave off file2 to use default HexChat icon.
- TRAY -f &lt;filename>                  Set tray to a fixed icon.
- TRAY -i &lt;number>                    Flash tray with an internal icon.
-                                     <small>2=Message 5=Highlight 8=Private 11=File</small>
- TRAY -t &lt;text>                      Set the tray tooltip.
- TRAY -b &lt;title> &lt;text>              Set the tray balloon.
-                                     <small>Supported on Windows from 2.8.1 and 2.8.2 on Linux (libnotify required on Linux).</small>
-</pre>
-Filenames can be ICO or PNG format. PNG format is supported on Linux/BSD and Windows XP (but requires installation of GDI+ on Windows 2000). Set a timeout of -1 to use HexChat's default.
-<br><br>
-
-<h3><a name=unicode>Handling UTF-8/Unicode strings</a></h3>
-<p>
-The HexChat plugin API specifies that strings passed to and from HexChat must be encoded in UTF-8.
-<br><br>
-What does this mean for the plugin programmer? You just have to be a little careful when
-passing strings obtained from IRC to system calls. For example, if you're writing a file-server
-bot, someone might message you a filename. Can you pass this filename directly to open()? Maybe!
-If you're lazy... The correct thing to do is to convert the string to "system locale encoding",
-otherwise your plugin will fail on non-ascii characters.
-<br><br>
-Here are examples on how to do this conversion on Unix and Windows. In this example, someone will
-CTCP you the message "SHOWFILE &lt;filename&gt;".
-<br><br>
-</p>
-<pre>
-static int ctcp_cb(char *word[], char *word_eol[], void *userdata)
-{
-	if(strcmp(word[1], "SHOWFILE") == 0)
-	{
-		get_file_name(nick, word[2]);
-	}
-
-	return XCHAT_EAT_XCHAT;
-}
-
-static void get_file_name(char *nick, char *fname)
-{
-	char buf[256];
-	FILE *fp;
-
-<font color="#777777">	/* the fname is in UTF-8, because it came from the HexChat API */</font>
-</pre><font color="#33aa44">#ifdef _WIN32</font><pre>
-	wchar_t wide_name[MAX_PATH];
-
-<font color="#777777">	/* convert UTF-8 to WIDECHARs (aka UTF-16LE) */</font>
-	if (MultiByteToWideChar(CP_UTF8, 0, fname, -1, wide_name, MAX_PATH) < 1)
-		return;
-
-<font color="#777777">	/* now we have WIDECHARs, so we can _wopen() or CreateFileW(). */
-	/* _wfopen actually requires NT4, Win2000, XP or newer. */</font>
-	fp = _wfopen(wide_name, "r");
-</pre><font color="#33aa44">#else</font><pre>
-	char *loc_name;
-
-<font color="#777777">	/* convert UTF-8 to System Encoding */</font>
-	loc_name = g_filename_from_utf8(fname, -1, 0, 0, 0);
-	if(!loc_name)
-		return;
-
-<font color="#777777">	/* now open using the system's encoding */</font>
-	fp = fopen(loc_name, "r");
-	g_free(loc_name);
-</pre><font color="#33aa44">#endif</font><pre>
-	if (fp)
-	{
-		while (fgets (buf, sizeof(buf), fp))
-		{
-<font color="#777777">			/* send every line to the user that requested it */</font>
-			xchat_commandf (ph, "QUOTE NOTICE %s :%s", nick, buf);
-		}
-		fclose (fp);
-	}
-}
-</pre>
-
-
-
-<br><br>
-
-<h1>Functions</h1>
-
-<h3><a class=cmd name="xchat_hook_command">&nbsp;xchat_hook_command()&nbsp;</a></h3>
-<b>Prototype:</b> xchat_hook *xchat_hook_command(xchat_plugin *ph, const char *name, int pri, xchat_cmd_cb *callb, const char *help_text, void *userdata);
-<br>
-<br><b>Description:</b> Adds a new /command. This allows your program to
-handle commands entered at the input box. To capture text without a "/" at 
-the start (non-commands), you may hook a special name of "". i.e xchat_hook_command(ph, "", ...);.
-<br>
-Starting from version 2.6.8, commands hooked that begin with a period ('.') will be hidden in /HELP and /HELP -l.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>name:</b> Name of the command (without the forward slash).
-<br><b>pri:</b> Priority of this command. Use XCHAT_PRI_NORM.
-<br><b>callb:</b> Callback function. This will be called when the user executes the given command name.
-<br><b>help_text:</b> String of text to display when the user executes /help for this command. May be NULL if you're lazy.
-<br><b>userdata:</b> Pointer passed to the callback function.</blockquote>
-<b>Returns:</b> Pointer to the hook. Can be passed to xchat_unhook.
-<br>
-<br><b>Example:</b>
-<blockquote>
-<pre>
-static int onotice_cb(char *word[], char *word_eol[], void *userdata)
-{
-	if(word_eol[2][0] == 0)
-	{
-		xchat_printf(ph, "Second arg must be the message!\n");
-		return XCHAT_EAT_ALL;
-	}
-
-	xchat_commandf(ph, "NOTICE @%s :%s", xchat_get_info(ph, "channel"), word_eol[2]);
-	return XCHAT_EAT_ALL;
-}
-
-xchat_hook_command(ph, "ONOTICE", XCHAT_PRI_NORM, onotice_cb,
-                   "Usage: ONOTICE &lt;message> Sends a notice to all ops", NULL);
-</pre>
-</blockquote>
-<br>
-
-<h3><a class=cmd name="xchat_hook_fd">&nbsp;xchat_hook_fd()&nbsp;</a></h3>
-<b>Prototype:</b> xchat_hook *xchat_hook_fd(xchat_plugin *ph, int fd, int flags, xchat_fd_cb *callb, void *userdata);
-<br>
-<br><b>Description:</b> Hooks a socket or file descriptor. WIN32: Passing a pipe from MSVCR71, MSVCR80 or other variations is not supported at this time.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>fd:</b> The file descriptor or socket.
-<br><b>flags:</b> One or more of XCHAT_FD_READ, XCHAT_FD_WRITE, XCHAT_FD_EXCEPTION, XCHAT_FD_NOTSOCKET. Use bitwise OR to combine them.
-XCHAT_FD_NOTSOCKET tells HexChat that the provided <b>fd</b> is not a socket, but a "MSVCRT.DLL" pipe.
-<br><b>callb:</b> Callback function. This will be called when the socket is available for reading/writing or exception (depending on your chosen <b>flags</b>)
-<br><b>userdata:</b> Pointer passed to the callback function.</blockquote>
-<b>Returns:</b> Pointer to the hook. Can be passed to xchat_unhook.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_hook_print">&nbsp;xchat_hook_print()&nbsp;</a></h3>
-<b>Prototype:</b> <font color="#f8a400"><b>xchat_hook</b></font> *xchat_hook_print(<font color="#f8a400"><b>xchat_plugin</b></font> *ph, <font color="#f8a400"><b>const char</b></font> *name, <font color="#f8a400"><b>int</b></font> pri, <font color="#f8a400"><b>xchat_print_cb</b></font> *callb, <font color="#f8a400"><b>void</b></font> *userdata);
-<br>
-<br><b>Description:</b> Registers a function to trap any print events.
-The event names may be any available in the "Advanced > Text Events" window.
-There are also some extra "special" events you may hook using this function.
-Currently they are:<blockquote>
-"Open Context" - Called when a new xchat_context is created.
-<br>"Close Context" - Called when a xchat_context pointer is closed.
-<br>"Focus Tab" - Called when a tab is brought to front.
-<br>"Focus Window" - Called a toplevel window is focused, or the main
-tab-window is focused by the window manager.
-<br>"DCC Chat Text" - Called when some text from a DCC Chat arrives. It provides these elements in the word[] array:<blockquote>word[1] Address
-<br>word[2] Port
-<br>word[3] Nick
-<br>word[4] The Message
-</blockquote>
-"Key Press" - Called when some keys are pressed in the input-box (since 2.4.2). It provides these elements in the word[] array:<blockquote>word[1] Key Value
-<br>word[2] State Bitfield (shift, capslock, alt)
-<br>word[3] String version of the key
-<br>word[4] Length of the string (may be 0 for unprintable keys)
-</blockquote>
-</blockquote>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>name:</b> Name of the print event (as in Edit Event Texts Window).
-<br><b>pri:</b> Priority of this command. Use XCHAT_PRI_NORM.
-<br><b>callb:</b> Callback function. This will be called when this event name is printed.
-<br><b>userdata:</b> Pointer passed to the callback function.</blockquote>
-<b>Returns:</b> Pointer to the hook. Can be passed to xchat_unhook.
-<br>
-<br><b>Example:</b>
-<blockquote>
-<pre>
-static int youpart_cb(char *word[], void *userdata)
-{
-	xchat_printf(ph, "You have left channel %s\n", word[3]);
-	return XCHAT_EAT_XCHAT;	/* dont let HexChat do its normal printing */
-}
-
-xchat_hook_print(ph, "You Part", XCHAT_PRI_NORM, youpart_cb, NULL);
-</pre>
-</blockquote>
-<br>
-
-<h3><a class=cmd name="xchat_hook_server">&nbsp;xchat_hook_server()&nbsp;</a></h3>
-<b>Prototype:</b> xchat_hook *xchat_hook_server(xchat_plugin *ph, const char *name, int pri, xchat_serv_cb *callb, void *userdata);
-<br>
-<br><b>Description:</b> Registers a function to be called when a certain server event occurs. You can
-use this to trap PRIVMSG, NOTICE, PART, a server numeric etc... If you want to
-hook every line that comes from the IRC server, you may use the special name of "RAW LINE".
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>name:</b> Name of the server event.
-<br><b>pri:</b> Priority of this command. Use XCHAT_PRI_NORM.
-<br><b>callb:</b> Callback function. This will be called when this event is received from the server.
-<br><b>userdata:</b> Pointer passed to the callback function.</blockquote>
-<b>Returns:</b> Pointer to the hook. Can be passed to xchat_unhook.
-<br>
-<br><b>Example:</b>
-<blockquote>
-<pre>
-static int kick_cb(char *word[], char *word_eol[], void *userdata)
-{
-	xchat_printf(ph, "%s was kicked from %s (reason=%s)\n", word[4], word[3], word_eol[5]);
-	return XCHAT_EAT_NONE;	/* don't eat this event, let other plugins and HexChat see it too */
-}
-
-xchat_hook_server(ph, "KICK", XCHAT_PRI_NORM, kick_cb, NULL);
-</pre>
-</blockquote>
-<br>
-
-<h3><a class=cmd name="xchat_hook_timer">&nbsp;xchat_hook_timer()&nbsp;</a></h3>
-<b>Prototype:</b> xchat_hook *xchat_hook_timer(xchat_plugin *ph, int timeout, xchat_timer_cb *callb, void *userdata);
-<br>
-<br><b>Description:</b> Registers a function to be called every "timeout" milliseconds.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>timeout:</b> Timeout in milliseconds (1000 is 1 second).
-<br><b>callb:</b> Callback function. This will be called every "timeout" milliseconds.
-<br><b>userdata:</b> Pointer passed to the callback function.</blockquote>
-<b>Returns:</b> Pointer to the hook. Can be passed to xchat_unhook.
-<br>
-<br><b>Example:</b>
-<blockquote>
-<pre>
-static xchat_hook *myhook;
-
-static int stop_cb(char *word[], char *word_eol[], void *userdata)
-{
-	if(myhook != NULL)
-	{
-		xchat_unhook(ph, myhook);
-		myhook = NULL;
-		xchat_print(ph, "Timeout removed!\n");
-	}
-
-	return XCHAT_EAT_ALL;
-}
-
-static int timeout_cb(void *userdata)
-{
-	xchat_print(ph, "Annoying message every 5 seconds! Type /STOP to stop it.\n");
-	return 1;	/* return 1 to keep the timeout going */
-}
-
-myhook = xchat_hook_timer(ph, 5000, timeout_cb, NULL);
-xchat_hook_command(ph, "STOP", XCHAT_PRI_NORM, stop_cb, NULL, NULL);
-</pre><br>
-</blockquote>
-
-<h3><a class=cmd name="xchat_unhook">&nbsp;xchat_unhook()&nbsp;</a></h3>
-<b>Prototype:</b> void *xchat_unhook(xchat_plugin *ph, xchat_hook *hook);
-<br>
-<br><b>Description:</b> Unhooks any hook registered with xchat_hook_print/server/timer/command. When plugins are unloaded, all of its hooks are automatically
-removed, so you don't need to call this within your xchat_plugin_deinit() function.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>hook:</b> Pointer to the hook, as returned by xchat_hook_*.
-<br></blockquote>
-<b>Returns:</b> The userdata you originally gave to xchat_hook_*.
-<br><br>
-
-<h3><a class=cmd name="xchat_command">&nbsp;xchat_command()&nbsp;</a></h3>
-<b>Prototype:</b> void xchat_command(xchat_plugin *ph, const char *command);
-<br>
-<br><b>Description:</b> Executes a command as if it were typed in HexChat's input box.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>command:</b> Command to execute, without the forward slash "/".
-<br><br>
-</blockquote>
-
-<h3><a class=cmd name="xchat_commandf">&nbsp;xchat_commandf()&nbsp;</a></h3>
-<b>Prototype:</b> void xchat_commandf(xchat_plugin *ph, const char *format, ...);
-<br>
-<br><b>Description:</b> Executes a command as if it were typed in HexChat's input box and provides string formating like printf.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>format:</b> The format string.
-<br><br>
-</blockquote>
-
-<h3><a class=cmd name="xchat_print">&nbsp;xchat_print()&nbsp;</a></h3>
-<b>Prototype:</b> void xchat_print(xchat_plugin *ph, const char *text);
-<br>
-<br><b>Description:</b> Prints some text to the current tab/window.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>text:</b> Text to print. May contain mIRC color codes.
-<br><br>
-</blockquote>
-
-<h3><a class=cmd name="xchat_printf">&nbsp;xchat_printf()&nbsp;</a></h3>
-<b>Prototype:</b> void xchat_printf(xchat_plugin *ph, const char *format, ...);
-<br>
-<br><b>Description:</b> Prints some text to the current tab/window and provides formating like printf.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>format:</b> The format string.
-<br><br>
-</blockquote>
-
-<h3><a class=cmd name="xchat_emit_print">&nbsp;xchat_emit_print()&nbsp;</a></h3>
-<b>Prototype:</b> int xchat_emit_print(xchat_plugin *ph, const char *event_name, ...);
-<br>
-<br><b>Description:</b> Generates a print event. This can be any
-event found in the Preferences > Advanced > Text Events window. The vararg parameter list
-MUST always be NULL terminated. Special care should be taken when calling this function
-inside a print callback (from xchat_hook_print), as not to cause endless recursion.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>event_name:</b> Text event to print.
-<br><br>
-</blockquote>
-<b>Returns:</b> 1-Success 0-Failure.
-<br><br>
-<b>Example:</b>
-<pre>
-xchat_emit_print(ph, "Channel Message", "John", "Hi there", "@", NULL);
-</pre>
-<br><br>
-
-<h3><a class=cmd name="xchat_send_modes">&nbsp;xchat_send_modes()&nbsp;</a><small>(new for 2.0.9)</small></h3>
-<b>Prototype:</b> void xchat_send_modes (xchat_plugin *ph, const char *targets[], int ntargets, int modes_per_line, char sign, char mode)
-<br>
-<br><b>Description:</b> Sends a number of channel mode changes to the current channel. For example, you can Op a whole
-group of people in one go. It may send multiple MODE lines if the request doesn't fit on one. Pass 0 for
-<b>modes_per_line</b> to use the current server's maximum possible. This function should only be called while
-in a channel context.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>targets:</b> Array of targets (strings). The names of people whom the action will be performed on.
-<br><b>ntargets:</b> Number of elements in the array given.
-<br><b>modes_per_line:</b> Maximum modes to send per line.
-<br><b>sign:</b> Mode sign, '-' or '+'.
-<br><b>mode:</b> Mode char, e.g. 'o' for Ops.<br>
-</blockquote>
-<b>Example:</b> (Ops the three names given)
-<pre>
-const char *names_to_Op[] = {"John", "Jack", "Jill"};
-xchat_send_modes(ph, names_to_Op, 3, 0, '+', 'o');
-</pre>
-<br><br>
-
-<h3><a class=cmd name="xchat_find_context">&nbsp;xchat_find_context()&nbsp;</a></h3>
-<b>Prototype:</b> xchat_context *xchat_find_context(xchat_plugin *ph, const char *servname, const char *channel);
-<br>
-<br><b>Description:</b> Finds a context based on a channel and servername. If servname is NULL, it finds any channel (or query) by the given name. If channel is NULL, it finds the front-most tab/window of the given servname. If NULL is given for both arguments, the currently focused tab/window will be returned.<br>
-Changed in 2.6.1. If servname is NULL, it finds the channel (or query) by the given name in the same server group as the current context. If that doesn't exists then find any by the given name.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>servname:</b> Servername or NULL.
-<br><b>channel:</b> Channelname or NULL.
-<br>
-</blockquote>
-<b>Returns:</b> Context pointer (for use with xchat_set_context) or NULL.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_get_context">&nbsp;xchat_get_context()&nbsp;</a></h3>
-<b>Prototype:</b> xchat_context *xchat_get_context(xchat_plugin *ph);
-<br>
-<br><b>Description:</b> Returns the current context for your plugin. You can use this later with xchat_set_context.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br>
-</blockquote>
-<b>Returns:</b> Context pointer (for use with xchat_set_context).
-<br><br><br>
-
-<h3><a class=cmd name="xchat_get_info">&nbsp;xchat_get_info()&nbsp;</a></h3>
-<b>Prototype:</b> const char *xchat_get_info(xchat_plugin *ph, const char *id);
-<br>
-<br><b>Description:</b> Returns information based on your current context.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>id:</b> ID of the information you want. Currently supported IDs are (case sensitive):
-	<blockquote>
-	<table border=0>
-	<tr><td width="18%">away</td><td>away reason or NULL if you are not away.</td></tr>
-	<tr><td>channel</td><td>current channel name.</td></tr>
-	<tr><td>charset</td><td>character-set used in the current context (since 2.4.2).</td></tr>
-	<tr><td>event_text &lt;name></td><td>text event format string for <i>name</i> (since 2.8.2).</td></tr>
-	<tr><td>gtkwin_ptr</td><td>(GtkWindow *) (since 2.8.9).</td></tr>
-	<tr><td>host</td><td>real hostname of the server you connected to.</td></tr>
-	<tr><td>inputbox</td><td>the input-box contents, what the user has typed (since 2.4.1).</td></tr>
-	<tr><td>libdirfs</td><td>library directory. e.g. /usr/lib/xchat. The same directory used for auto-loading plugins (since 2.4.0).<small>This string isn't necessarily UTF-8, but local file system encoding.</small></td></tr>
-	<tr><td>modes</td><td>channel modes, if known, or NULL (since 2.8.1).</td></tr>
-	<tr><td>network</td><td>current network name or NULL.</td></tr>
-	<tr><td>nick</td><td>your current nick name.</td></tr>
-	<tr><td>nickserv</td><td>nickserv password for this network or NULL (since 2.4.3).</td></tr>
-	<tr><td>server</td><td>current server name (what the server claims to be). NULL if you are not connected.</td></tr>
-	<tr><td>topic</td><td>current channel topic.</td></tr>
-	<tr><td>version</td><td>xchat version number.</td></tr>
-	<tr><td>win_ptr</td><td>native window pointer. Unix: (GtkWindow *) Win32: HWND (since 2.6.0).</td></tr>
-	<tr><td>win_status</td><td>window status: "active", "hidden" or "normal" (since 2.0.9).</td>
-	<tr><td>xchatdir</td><td>xchat config directory, e.g.: /home/user/.xchat2 <small>This string is encoded in UTF-8, which means you _should_ convert it to "locale" encoding before using functions like open() or OpenFile(). For best <a href="#unicode">Unicode support</a> on Linux, convert this string using g_filename_from_utf8 and on Windows convert this string to UTF-16LE (wide) and use OpenFileW() etc.</small></td></tr>
-	<tr><td>xchatdirfs</td><td>xchat config directory, e.g.: /home/user/.xchat2 (since 2.0.9).<small>This string is encoded in local file system encoding, making it ideal for direct use with functions like open() or OpenFile(). For real Unicode support on Windows, it's best not to use HexChatdirfs, but HexChatdir instead.</small></td></tr>
-	</table>
-	</blockquote>
-</blockquote>
-<b>Returns:</b> A string of the requested information, or NULL. This string must
-not be freed and must be copied if needed after the call to xchat_get_info.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_get_prefs">&nbsp;xchat_get_prefs()&nbsp;</a></h3>
-<b>Prototype:</b> int xchat_get_prefs(xchat_plugin *ph, const char *name, const char **string, int *integer);
-<br>
-<br><b>Description:</b> Provides xchat's setting information (that which is available through the /set command).
-A few extra bits of information are available that don't appear in the /set list, currently they are:
-<br>
-<blockquote>
-	<table border=0 cellpadding=5>
-	<tr><td width="18%">state_cursor</td><td>Current input-box cursor position (characters, not bytes). Since 2.4.2.</td></tr>
-	<tr><td width="18%">id</td><td>Unique server id. Since 2.6.1.</td></tr>
-	</table>
-</blockquote>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>name:</b> Setting name required.
-<br><b>string:</b> Pointer-pointer which to set.
-<br><b>integer:</b> Pointer to an integer to set, if setting is a Boolean or Integer type.
-</blockquote>
-<b>Returns:</b> 0-Failed 1-Returned a string 2-Returned an Integer 3-Returned a Boolean.
-<br><br><b>Example:</b>
-<blockquote>
-<pre>
-{
-	int i;
-	const char *str;
-
-	if (xchat_get_prefs (ph, "irc_nick1", &amp;str, &amp;i) == 1)
-	{
-		xchat_printf (ph, "Current nickname setting: %s\n", str);
-	}
-}</pre>
-</blockquote>
-<br><br>
-
-
-<h3><a class=cmd name="xchat_set_context">&nbsp;xchat_set_context()&nbsp;</a></h3>
-<b>Prototype:</b> int xchat_set_context(xchat_plugin *ph, xchat_context *ctx);
-<br>
-<br><b>Description:</b> Changes your current context to the one given.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>ctx:</b> Context to change to (obtained with xchat_get_context or xchat_find_context).
-<br>
-</blockquote>
-<b>Returns:</b> 1 for success, 0 for failure.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_nickcmp">&nbsp;xchat_nickcmp()&nbsp;</a></h3>
-<b>Prototype:</b> int xchat_nickcmp(xchat_plugin *ph, const char *s1, const char *s2);
-<br>
-<br><b>Description:</b> Performs a nick name comparision, based on the current server connection. This might be a RFC1459 compliant string compare, or
-plain ascii (in the case of DALNet). Use this to compare channels and nicknames. The function works the same way as strcasecmp.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>s1:</b> String to compare.
-<br><b>s2:</b> String to compare s1 to.
-<br>
-</blockquote>
-<b>Quote from RFC1459:</b>
-<blockquote>
-  Because of IRC's scandanavian origin, the characters {}| are
-   considered to be the lower case equivalents of the characters []\,
-   respectively. This is a critical issue when determining the
-   equivalence of two nicknames.
-</blockquote>
-<b>Returns:</b>
-       An integer
-       less than, equal to, or greater than zero if s1 is found,
-       respectively, to be less than, to match, or be greater than s2.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_strip">&nbsp;xchat_strip()&nbsp;</a><small>(new for 2.4.2)</small></h3>
-<b>Prototype:</b> char *xchat_strip(xchat_plugin *ph, const char *str, int len, int flags);
-<br>
-<br><b>Description:</b> Strips mIRC color codes and/or text attributes (bold, underlined etc) from the given string and returns a newly allocated string.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>str:</b> String to strip.
-<br><b>len:</b> Length of the string (or -1 for NULL terminated).
-<br><b>flags:</b> Bit-field of flags: 0-Strip mIRC colors, 1-Strip text attributes.
-<br>
-</blockquote>
-<b>Returns:</b>
-A newly allocated string or NULL for failure. You must free this string with xchat_free.
-<br><br><b>Example:</b>
-<blockquote>
-<pre>
-{
-	char *new_text;
-
-	/* strip both colors and attributes by using the 0 and 1 bits (1 BITWISE-OR 2) */
-	new_text = xchat_strip(ph, "\00312Blue\003 \002Bold!\002", -1, 1 | 2);
-
-	if(new_text)
-	{
-		/* new_text should now contain only "Blue Bold!" */
-		xchat_printf(ph, "%s\n", new_text);
-		xchat_free(ph, new_text);
-	}
-}</pre>
-</blockquote>
-
-<br><br>
-
-<h3><a class=cmd name="xchat_free">&nbsp;xchat_free()&nbsp;</a><small>(new for 2.4.2)</small></h3>
-<b>Prototype:</b> void xchat_free(xchat_plugin *ph, void *ptr);
-<br>
-<br><b>Description:</b> Frees a string returned by xchat_* functions. Currently only used to free strings from xchat_strip.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>ptr:</b> Pointer to free.
-<br>
-</blockquote>
-
-<br><br>
-
-<h3><a class=cmd name="xchat_pluginpref_set_str">&nbsp;xchat_pluginpref_set_str()&nbsp;</a><small>(new for 2.9.0)</small></h3>
-<b>Prototype:</b> int xchat_pluginpref_set_str (xchat_plugin *ph, const char *var, const char *value);
-<br>
-<br><b>Description:</b> Saves a plugin-specific setting with string value to a plugin-specific config file.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>var:</b> Name of the setting to save.
-<br><b>value:</b> String value of the the setting.
-<br>
-</blockquote>
-<b>Returns:</b> 1 for success, 0 for failure.
-<br><br><b>Example:</b>
-<blockquote>
-<pre>int xchat_plugin_init (xchat_plugin *plugin_handle,
-			char **plugin_name,
-			char **plugin_desc,
-			char **plugin_version,
-			char *arg)
-{
-	ph = plugin_handle;
-	*plugin_name = "Tester Thingie";
-	*plugin_desc = "Testing stuff";
-	*plugin_version = "1.0";
-
-	xchat_pluginpref_set_str (ph, "myvar1", "I want to save this string!");
-	xchat_pluginpref_set_str (ph, "myvar2", "This is important, too.");
-
-	return 1;       /* return 1 for success */
-}</pre>
-</blockquote>
-In the example above, the settings will be saved to the plugin_tester_thingie.conf file, and its content will be:
-<blockquote>
-<pre>myvar1 = I want to save this string!
-myvar2 = This is important, too.</pre>
-</blockquote>
-You should never need to edit this file manually.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_pluginpref_get_str">&nbsp;xchat_pluginpref_get_str()&nbsp;</a><small>(new for 2.9.0)</small></h3>
-<b>Prototype:</b> int xchat_pluginpref_get_str (xchat_plugin *ph, const char *var, char *dest);
-<br>
-<br><b>Description:</b> Loads a plugin-specific setting with string value from a plugin-specific config file.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>var:</b> Name of the setting to load.
-<br><b>dest:</b> Array to save the loaded setting's string value to.
-<br>
-</blockquote>
-<b>Returns:</b> 1 for success, 0 for failure.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_pluginpref_set_int">&nbsp;xchat_pluginpref_set_int()&nbsp;</a><small>(new for 2.9.0)</small></h3>
-<b>Prototype:</b> int xchat_pluginpref_set_int (xchat_plugin *ph, const char *var, int value);
-<br>
-<br><b>Description:</b> Saves a plugin-specific setting with decimal value to a plugin-specific config file.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>var:</b> Name of the setting to save.
-<br><b>value:</b> Decimal value of the the setting.
-<br>
-</blockquote>
-<b>Returns:</b> 1 for success, 0 for failure.
-<br><br><b>Example:</b>
-<blockquote>
-<pre>static int saveint_cb (char *word[], char *word_eol[], void *user_data)
-{
-	int buffer = atoi (word[2]);
-
-	if (buffer > 0 && buffer < INT_MAX)
-	{
-		if (xchat_pluginpref_set_int (ph, "myint1", buffer))
-		{
-			xchat_printf (ph, "Setting successfully saved!\n");
-		}
-		else
-		{
-			xchat_printf (ph, "Error while saving!\n");
-		}
-	}
-	else
-	{
-		xchat_printf (ph, "Invalid input!\n");
-	}
-
-	return XCHAT_EAT_XCHAT;
-}</pre>
-</blockquote>
-You only need these kind of complex checks if you're saving user input, which can be non-numeric.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_pluginpref_get_int">&nbsp;xchat_pluginpref_get_int()&nbsp;</a><small>(new for 2.9.0)</small></h3>
-<b>Prototype:</b> int xchat_pluginpref_get_int (xchat_plugin *ph, const char *var);
-<br>
-<br><b>Description:</b> Loads a plugin-specific setting with decimal value from a plugin-specific config file.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>var:</b> Name of the setting to load.
-<br>
-</blockquote>
-<b>Returns:</b> The decimal value of the requested setting upon success, -1 for failure.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_pluginpref_delete">&nbsp;xchat_pluginpref_delete()&nbsp;</a><small>(new for 2.9.0)</small></h3>
-<b>Prototype:</b> int xchat_pluginpref_delete (xchat_plugin *ph, const char *var);
-<br>
-<br><b>Description:</b> Deletes a plugin-specific setting from a plugin-specific config file.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>var:</b> Name of the setting to delete.
-<br>
-</blockquote>
-<b>Returns:</b> 1 for success, 0 for failure. If the given setting didn't exist, it also returns 1, so 1 only indicates that the setting won't exist after the call.
-<br><br><br>
-
-<h3><a class=cmd name="xchat_pluginpref_list">&nbsp;xchat_pluginpref_list()&nbsp;</a><small>(new for 2.9.0)</small></h3>
-<b>Prototype:</b> int xchat_pluginpref_list (xchat_plugin *ph, char *dest);
-<br>
-<br><b>Description:</b> Builds a comma-separated list of the currently saved settings from a plugin-specific config file.
-<br>
-<br><b>Arguments:</b>
-<blockquote><b>ph:</b> Plugin handle (as given to xchat_plugin_init).
-<br><b>dest:</b> Array to save the list to.
-<br>
-</blockquote>
-<b>Returns:</b> 1 for success, 0 for failure (nonexistent, empty or inaccessible config file).
-<br><br><br>
-
-</body>
-</html>
diff --git a/plugins/python/hexchat-python.md b/plugins/python/hexchat-python.md
deleted file mode 100644
index bc4c6cdc..00000000
--- a/plugins/python/hexchat-python.md
+++ /dev/null
@@ -1,545 +0,0 @@
-% HexChat Python Interface
-
-Features
---------
-
-Here are some of the features of the python plugin interface:
-
--   Comprehensive, consistent and straightforward API
--   Load, unload, reload, and autoload support
--   Per plugin independent interpreter state
--   Python interactive console
--   Python interactive command execution
--   Full thread support
--   Stdout and stderr redirected to xchat console
--   Dynamic list management
--   Nice context treatment
--   Plugin preferences
-
-Commands
---------
-
-The following commands will be intercepted by the Python Plugin interface module, when it is loaded.
-
----------------------------------------------------------------------------------------------------------------------------------------------
-*Command*                           *Description*
-----------------------------------  ---------------------------------------------------------------------------------------------------------
-/py load <filename>                 Load module with given filename.
-
-/py unload <filename|module name>   Unload module with given filename, or module name.
-
-/py reload <filename|module name>   Reload module with given filename, or module name.
-
-/py list                            List Python modules loaded.
-
-/py exec <command>                  Execute given Python command interactively. For example:
-                                            `/py exec import xchat`
-                                            `/py exec print xchat.get_info('channel')`
-
-/py console                         Open the Python interactive console in a query (>>python<<).
-                                        Every message sent will be intercepted by the Python plugin interface, and interpreted interactively.
-                                        Notice that the console and /py exec commands live in the same interpreter state.
-
-/py about                           Show some information about the Python plugin interface.
-----------------------------------------------------------------------------------------------------------------------------------------------
-
-
-Autoloading modules
--------------------
-
-If you want some module to be autoloaded together with the Python plugin
-interface (which usually loads at startup time), just make sure it has a
-`.py` extension and put it in your HexChat directory (~/.config/hexchat/addons, %APPDATA%\\HexChat\\addons).
-
-Context theory
---------------
-
-Before starting to explain what the API offers, I'll do a short
-introduction about the xchat context concept. Not because it's something
-hard to understand, but because you'll understand better the API
-explanations if you know what I'm talking about.
-
-You can think about a context as an xchat channel, server, or query tab.
-Each of these tabs, has its own context, and is related to a given
-server and channel (queries are a special kind of channel).
-
-The *current* context is the one where xchat passes control to the
-module. For example, when xchat receives a command in a specific
-channel, and you have asked xchat to tell you about this event, the
-current context will be set to this channel before your module is
-called.
-
-Hello world
------------
-
-Here is the traditional *hello world* example.
-
-~~~~~~~~~~ {.python}
-    __module_name__ = "helloworld" 
-    __module_version__ = "1.0" 
-    __module_description__ = "Python module example" 
-     
-    print "Hello world!" 
-~~~~~~~~~~
-
-This module will print "Hello world!" in the xchat console, and sleep
-forever until it's unloaded. It's a simple module, but already
-introduces some concepts. Notice how the module information is set. This
-information is obligatory, and will be shown when listing the loaded
-xchat modules.
-
-xchat module
-------------
-
-The xchat module is your passport to every xchat functionality offered
-by the Python plugin interface. Here's a simple example:
-
-~~~~~~~~~~ {.python}
-    import xchat 
-    xchat.prnt("Hi everyone!")
-~~~~~~~~~~
-
-The following functions are available in the xchat module.
-
-### Generic functions
-
-#### xchat.prnt(string)
-
-This function will print string in the current context. It's mainly
-useful as a parameter to pass to some other function, since the usual
-print statement will have the same results. You have a usage example
-above.
-
-This function is badly
-named because `"print"` is a reserved keyword of the Python language.
-
-#### xchat.emit_print(event_name, *args)
-
-This function will generate a *print event* with the given arguments. To
-check which events are available, and the number and meaning of
-arguments, have a look at the `Settings > Lists > Text Events` window.
-Here is one example:
-
-~~~~~~~~~~ {.python}
-    xchat.emit_print("Channel Message", "John", "Hi there", "@")
-~~~~~~~~~~`
-
-#### xchat.command(string)
-
-Execute the given command in the current context. This has the same
-results as executing a command in the xchat window, but notice that the
-`/` prefix is not used. Here is an example:
-
-~~~~~~~~~~ {.python}
-    xchat.command("server irc.openprojects.net") 
-~~~~~~~~~~
-
-#### xchat.nickcmp(s1, s2)
-
-This function will do an RFC1459 compliant string comparing between `s1`
-and `s2`, and is useful to compare channels and nicknames. It returns an
-integer less than, equal to, or greater than zero if `s1` is found,
-respectively, to be less than, to match, or be greater than `s2`. For
-example:
-
-~~~~~~~~~~ {.python}
-    if xchat.nickcmp(nick, "mynick") == 0: 
-        print "They are the same!" 
-~~~~~~~~~~
-
-### Information retreiving functions
-
-#### xchat.get_info(type)
-
-Retrieve the information specified by the `type` string in the current
-context. At the moment of this writing, the following information types
-are available to be queried:
-
------------------------------------------------------------------------------------------------
-*Type*      *Description*
---------    -----------------------------------------------------------------------------------
-away        Away reason or None if you are not away.
-
-channels    Channel of the current context.
-
-hostname    Real hostname of the server you connected to.
-
-network     Current network name or None.
-
-nick        Your current nick name.
-
-server      Current server name (what the server claims to be) or None if you are not connected.
-
-topic       Current channel topic.
-
-version     hexchat version number.
-
-xchatdir    hexchat config directory e.g.: "~/.config/hexchat".
-------------------------------------------------------------------------------------------------
-
-Example:
-
-~~~~~~~~~~ {.python}
-    if xchat.get_info("server") is None: 
-        xchat.prnt("Not connected!") 
-~~~~~~~~~~
-
-#### xchat.get_prefs(name)
-
-Retrieve the xchat setting information specified by the `name` string,
-as available by the `/set` command. For example:
-
-~~~~~~~~~~ {.python}
-    print "Current preferred nick:", xchat.get_prefs("irc_nick1")
-~~~~~~~~~~
-
-#### xchat.get_list(type)
-
-With this function you may retrieve a list containing the selected
-information from the current context, like a DCC list, a channel list, a
-user list, etc. Each list item will have its attributes set dynamically
-depending on the information provided by the list type.
-
-The example below is a rewrite of the example provided with xchat's
-plugin API documentation. It prints a list of every DCC transfer
-happening at the moment. Notice how similar the interface is to the C
-API provided by xchat.
-
-~~~~~~~~~~ {.python}
-    list = xchat.get_list("dcc") 
-    if list: 
-        print "--- DCC LIST ------------------" 
-        print "File  To/From   KB/s   Position" 
-        for i in list: 
-            print "%6s %10s %.2f  %d" % (i.file, i.nick, i.cps/1024, i.pos) 
-~~~~~~~~~~
-
-Below you will find what each list type has to offer.
-
-This information was
-taken from xchat's plugin documentation. You may find any types not
-listed here, if they exist at all, in an updated xchat documentation.
-Any list types accepted by xchat should be dynamically accepted by the
-Python plugin interface.
-
-##### channels
-
-The channels list type gives you access to the channels, queries and
-their servers. The folloing attributes are available in each list item:
-
--------------------------------------------------------------------
-*Type*      *Description*
--------     -------------------------------------------------------
-channel     Channel or query name.
-
-context     A context object, giving access to that channel/server.
-
-network     Network name to which this channel belongs.
-
-server      Server name to which this channel belongs.
-
-type        Type of context (1=Server, 2=Channel, 3=Dialog).
--------------------------------------------------------------------
-
-##### dcc
-
-The dcc list type gives you access to a list of DCC file transfers. The
-following attributes are available in each list item:
-
----------------------------------------------------------------------------------------
-*Type*      *Description*
----------   ---------------------------------------------------------------------------
-address32   Address of the remote user (ipv4 address, as an int).
-
-cps         Bytes per second (speed).
-
-destfile    Destination full pathname.
-
-file        Filename.
-
-nick        Nickname of person who the file is from/to.
-
-port        TCP port number.
-
-pos         Bytes sent/received.
-
-resume      Point at which this file was resumed (or zero if it was not resumed).
-
-size        File size in bytes.
-
-status      DCC status (queued=0, active=1, failed=2, done=3, connecting=4, aborted=5).
-
-type        DCC type (send=0, receive=1, chatrecv=2, chatsend=3).
----------------------------------------------------------------------------------------
-
-##### users
-
-The users list type gives you access to a list of users in the current
-channel. The following attributes are available in each list item:
-
-----------------------------------------------------------------
-*Type*  *Description*
-------  --------------------------------------------------------
-nick    Nick name.
-
-host    Host name in the form user@host (or None, if not known).
-
-prefix  Prefix character, .e.g: @ or +. Points to a single char.
-----------------------------------------------------------------
-
-##### ignore
-
-The ignore list type gives you access to the current ignored list. The
-following attributes are available in each list item:
-
------------------------------------------------------------------------------------------------------------
-*Type*  *Description*
------   ---------------------------------------------------------------------------------------------------
-mask    Ignore mask (for example, "*!*@*.aol.com").
-
-flags   Bit field of flags (0=private, 1=notice, 2=channel, 3=ctcp, 4=invite, 5=unignore, 6=nosave, 7=dcc).
------------------------------------------------------------------------------------------------------------
-
-### Hook functions
-
-These functions allow one to hook into xchat events.
-
-#### Priorities
-
-When a priority keyword parameter is accepted, it means that this
-callback may be hooked with five different priorities: PRI_HIGHEST,
-PRI_HIGH, PRI_NORM, PRI_LOW, and PRI_LOWEST. The usage of these
-constants, which are available in the xchat module, will define the
-order in which your plugin will be called. Most of the time, you won't
-want to change its default value (PRI_NORM).
-
-#### Parameters word and word_eol
-
-These parameters, when available in a callback, are lists of strings
-which contain the parameters the user entered for the particular
-command. For example, if you executed:
-
-> /command NICK Hi there! 
-
--   **word[0]** is `command`
--   **word[1]** is `NICK`
--   **word[2]** is `Hi`
--   **word[3]** is `there!`
--   **word_eol[0]** is `command NICK Hi there!`
--   **word_eol[1]** is `NICK Hi there!`
--   **word_eol[2]** is `Hi there!`
--   **word_eol[3]** is `there!`
-
-#### Parameter userdata
-
-The parameter userdata, if given, allows you to pass a custom object to
-your callback.
-
-#### Callback return constants (EAT_*)
-
-When a callback is supposed to return one of the EAT_* macros, it is
-able control how xchat will proceed after the callback returns. These
-are the available constants, and their meanings:
-
----------------------------------------------------------
-*Constant*  *Description*
------------ ---------------------------------------------
-EAT_PLUGIN Don't let any other plugin receive this event.
-
-EAT_XCHAT  Don't let xchat treat this event as usual.
-
-EAT_ALL    Eat the event completely.
-
-EAT_NONE   Let everything happen as usual.
----------------------------------------------------------
-
-Returning `None` is the same as returning `EAT_NONE`.
-
-#### xchat.hook_command(name, callback, userdata=None, priority=PRI_NORM, help=None)
-
-This function allows you to hook into the name xchat command. It means
-that everytime you type `/name ...`, `callback` will be called.
-Parameters `userdata` and `priority` have their meanings explained
-above, and the parameter help, if given, allows you to pass a help text
-which will be shown when `/help name` is executed. This function returns
-a hook handler which may be used in the `xchat.unhook()` function. For
-example:
-
-~~~~~~~~~~ {.python}
-    def onotice_cb(word, word_eol, userdata): 
-        if len(word) < 2: 
-            print "Second arg must be the message!" 
-        else: 
-            xchat.command("NOTICE @%s %s" % (xchat.get_info("channel"), word_eol[1])) 
-        return xchat.EAT_ALL 
-     
-    xchat.hook_command("ONOTICE", onotice_cb, help="/ONOTICE <message> Sends a notice to all ops")
-~~~~~~~~~~
-
-You may return one of `EAT_*` constants in the callback, to control
-xchat's behavior, as explained above.
-
-#### xchat.hook_print(name, callback, userdata=None, priority=PRI_NORM)
-
-This function allows you to register a callback to trap any print
-events. The event names are available in the *Edit Event Texts* window.
-Parameters `userdata` and `priority` have their meanings explained
-above. This function returns a hook handler which may be used in the
-`xchat.unhook()` function. For example:
-
-~~~~~~~~~~ {.python}
-    def youpart_cb(word, word_eol, userdata): 
-        print "You have left channel", word[2] 
-        return xchat.EAT_XCHAT # Don't let xchat do its normal printing 
-     
-    xchat.hook_print("You Part", youpart_cb) 
-~~~~~~~~~~
-
-You may return one of `EAT_*` constants in the callback, to control
-xchat's behavior, as explained above.
-
-#### xchat.hook_server(name, callback, userdata=None, priority=PRI_NORM)
-
-This function allows you to register a callback to be called when a
-certain server event occurs. You can use this to trap `PRIVMSG`,
-`NOTICE`, `PART`, a server numeric, etc. Parameters `userdata` and
-`priority` have their meanings explained above. This function returns a
-hook handler which may be used in the `xchat.unhook()` function. For
-example:
-
-~~~~~~~~~~ {.python}
-    def kick_cb(word, word_eol, userdata): 
-        print "%s was kicked from %s (%s)" % (word[3], word[2], word_eol[4]) 
-        # Don't eat this event, let other plugins and xchat see it too 
-        return xchat.EAT_NONE 
-     
-    xchat.hook_server("KICK", kick_cb) 
-~~~~~~~~~~
-
-You may return one of `EAT_*` constants in the callback, to control
-xchat's behavior, as explained above.
-
-#### xchat.hook_timer(timeout, callback, userdata=None)
-
-This function allows you to register a callback to be called every
-timeout milliseconds. Parameters userdata and priority have their
-meanings explained above. This function returns a hook handler which may
-be used in the `xchat.unhook()` function. For example:
-
-~~~~~~~~~~ {.python}
-    myhook = None 
-     
-    def stop_cb(word, word_eol, userdata): 
-        global myhook 
-        if myhook is not None: 
-            xchat.unhook(myhook) 
-            myhook = None 
-            print "Timeout removed!" 
-     
-    def timeout_cb(userdata): 
-        print "Annoying message every 5 seconds! Type /STOP to stop it." 
-        return 1 # Keep the timeout going 
-     
-    myhook = xchat.hook_timer(5000, timeout_cb) 
-    xchat.hook_command("STOP", stop_cb) 
-~~~~~~~~~~
-
-If you return a true value from the callback, the timer will be keeped,
-otherwise it is removed.
-
-#### xchat.hook_unload(timeout, callback, userdata=None)
-
-This function allows you to register a callback to be called when the
-plugin is going to be unloaded. Parameters `userdata` and `priority`
-have their meanings explained above. This function returns a hook
-handler which may be used in the `xchat.unhook()` function. For example:
-
-~~~~~~~~~~ {.python}
-    def unload_cb(userdata): 
-        print "We're being unloaded!" 
-     
-    xchat.hook_unload(unload_cb) 
-~~~~~~~~~~
-
-#### xchat.unhook(handler)
-
-Unhooks any hook registered with the hook functions above.
-
-### Plugin preferences
-
-You can use pluginpref to easily store and retrieve settings. This was added in the Python plugin version 0.9
-
-#### xchat.set_pluginpref(name, value)
-
-If neccessary creates a .conf file in the HexChat config dir named addon_python.conf and stores the value in it. Returns 1 on success 0 on failure.
-
-> Note: Until the plugin uses different a conf file per script it's recommened to use 'PluginName-SettingName' to avoid conflicts.
-
-#### xchat.get_pluginpref(name)
-
-This will return the value of the variable of that name. If there is none by this name it will return `None`. Numbers are always returned as Integers.
-
-#### xchat.del_pluginpref(name)
-
-Deletes specified variable. Returns 1 on success (or never existing), 0 on failure.
-
-#### xchat.list_pluginpref()
-
-Returns a list of all currently set preferences.
-
-### Context handling
-
-Below you will find information about how to work with contexts.
-
-#### Context objects
-
-As explained in the Context theory session above, contexts give access
-to a specific channel/query/server tab of xchat. Every function
-available in the xchat module will be evaluated in the current context,
-which will be specified by xchat itself before passing control to the
-module. Sometimes you may want to work in a specific context, and that's
-where context objects come into play.
-
-You may create a context object using the `xchat.get_context()` or
-`xchat.find_context()`, functions as explained below, or trough the
-`xchat.get_list()` function, as explained in its respective session.
-
-Each context object offers the following methods:
-
--------------------------------------------------------------------------------------------------------------------------
-*Methods*                                   *Description*
-----------------------------------------    -----------------------------------------------------------------------------
-context.set()                               Changes the current context to be the one represented by this context object.
-
-context.prnt(string)                        Does the same as the xchat.prnt() function, but in the given context.
-
-context.emit_print(event_name, *args)       Does the same as the emit_print() function, but in the given context.
-
-context.command(string)                     Does the same as the xchat.command() function, but in the given context.
-
-context.get_info(type)                      Does the same as the xchat.get_info() function, but in the given context.
-
-context.get_list(type)                      Does the same as the xchat.get_list() function, but in the given context.
--------------------------------------------------------------------------------------------------------------------------
-
-#### xchat.get_context()
-
-Returns a context object corresponding the the current context.
-
-#### xchat.find_context(server=None, channel=None)
-
-Finds a context based on a channel and servername. If `server` is
-`None`, it finds any channel (or query) by the given name. If `channel`
-is `None`, it finds the front-most tab/window of the given server. For
-example:
-
-~~~~~~~~~~ {.python}
-    cnc = xchat.find_context(channel='#conectiva') 
-    cnc.command('whois niemeyer') 
-~~~~~~~~~~
-
-* * * * *
-
-Original Author: Gustavo Niemeyer [gustavo@niemeyer.net](mailto:gustavo@niemeyer.net)
-
-For purty html: `pandoc --toc python.md -s --highlight-style haddock -o python.html`
diff --git a/plugins/tcl/README b/plugins/tcl/README
deleted file mode 100644
index e46635ef..00000000
--- a/plugins/tcl/README
+++ /dev/null
@@ -1,55 +0,0 @@
-Please read this document before asking questions.
-
-(1) WHAT IS THE TCL PLUGIN?
-
-    The XChat Tcl Plugin adds the complete Tcl scripting language to the
-    XChat 1.9.x and 2.x IRC client.  The design philosophy behind the tcl
-    plugin was to give all the power of the C API. yet completely shield
-    the user from all the complexities of it.  It is lightly modeled after
-    after Xircon; an old windows TCL enabled client with a little bit of
-    eggdrop functionality to it.
-
-    Features:
-     * Uses the popular TCL scripting language.
-     * Familiar to eggdrop bot owners.
-     * Adds many new XChat specific commands to the Tcl language for 
-       handling of events, user commands, timers, etc. 
-     * It's actually documented! (Hey, what a concept!) 
-     * Works with XChat 1.9.x and 2.x. 
-     * Open source (GPL) 
-
-    The supplied documentation for Tcl Plugin commands can be 
-    found in doc/tclplugin.html
-    
-    For a comprehensive list of IRC server tokens, see
-    doc/tokens.txt
-
-
-(2) HOW TO GET TCL PLUGIN
-
-    You can always find the latest version of the Tcl Plugin at:
-
-       http://www.scriptkitties.com/tclplugin
-
-   You must also have Tcl 8.3 or higher installed on your system.
-
-     Tcl can be obtained from:
-
-       http://sourceforge.net/projects/tcl
-       http://tcl.activestate.com (pre-compiled binaries)
-
-     Tcl Man Pages
-
-       http://tcl.activestate.com/man/
-
-     Tcl Tutorials:
-
-       http://hegel.ittc.ukans.edu/topics/tcltk/tutorial-noplugin/
-       http://jan.netcomp.monash.edu.au/ProgrammingUnix/tcl/tcl_tut.html
-       http://users.belgacom.net/bruno.champagne/tcl.html
-
-
-(3) QUICK STARTUP
-
-    SEE 'INSTALL'
-