updated docs

This commit is contained in:
Jakob Ovrum 2010-07-21 09:41:08 +09:00
parent 699a7df5b0
commit e981378ad8
1 changed files with 18 additions and 5 deletions

View File

@ -63,7 +63,7 @@
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#irc:connect">irc:connect</a>&nbsp;(server, port, timeout)</td>
<td class="name" nowrap><a href="#irc:connect">irc:connect</a>&nbsp;(server, port, host)</td>
<td class="summary">Connect <code>irc</code> to an IRC server.</td>
</tr>
@ -145,6 +145,11 @@
<h2>Tables</h2>
<table class="table_list">
<tr>
<td class="name" nowrap><a href="#Connection">Connection</a></td>
<td class="summary">Table with connection information.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Hooks">Hooks</a></td>
<td class="summary">List of hooks you can use with irc:hook.</td>
@ -169,7 +174,7 @@
<dt><a name="irc:connect"></a><strong>irc:connect</strong>&nbsp;(server, port, timeout)</dt>
<dt><a name="irc:connect"></a><strong>irc:connect</strong>&nbsp;(server, port, host)</dt>
<dd>
Connect <code>irc</code> to an IRC server.
@ -178,7 +183,7 @@ Connect <code>irc</code> to an IRC server.
<ul>
<li>
server: Server address.
server:
</li>
<li>
@ -186,7 +191,7 @@ Connect <code>irc</code> to an IRC server.
</li>
<li>
timeout: Connection timeout value in seconds. [default 30]
host: Host address.
</li>
</ul>
@ -610,8 +615,16 @@ Returns a new <code>irc</code> object.
<h2><a name="tables"></a>Tables</h2>
<dl class="table">
<dt><a name="Connection"></a><strong>Connection</strong></dt>
<dd>Table with connection information. <ul> <li><code>host</code> - Server host name.</li> <li><code>port</code> - Server port. [defaults to <code>6667</code>]</li> <li><code>timeout</code> - Connect timeout. [defaults to <code>30</code>]</li> <li><code>password</code> - Server password.</li> <li><code>secure</code> - Boolean to enable TLS connection, pass a params table (described, [luasec]) to control</li> </ul> [luasec]: http://www.inf.puc-rio.br/~brunoos/luasec/reference.html
</dd>
<dt><a name="Hooks"></a><strong>Hooks</strong></dt>
<dd>List of hooks you can use with irc:hook. The parameter list describes the parameters passed to the callback function. <ul> <li><code>OnDisconnect(message, errorOccurred)</code></li> <li><code>OnChat(user, channel, message)</code></li> <li><code>OnNotice(user, channel, message)</code></li> <li><code>OnJoin(user, channel)</code>*</li> <li><code>OnPart(user, channel)</code>*</li> <li><code>OnQuit(user, message)</code></li> <li><code>NickChange(user, newnick, channel)</code>*†</li> <li><code>NameList(channel, names)</code></li> <li><code>OnTopic(channel, topic)</code></li> <li><code>OnTopicInfo(channel, creator, timeCreated)</code></li> <li><code>OnKick(channel, nick, kicker, reason)</code>* (kicker is a <code>user</code> table)</li> </ul> * Event also invoked for yourself. † Channel passed only when user tracking is enabled
<dd>List of hooks you can use with irc:hook. The parameter list describes the parameters passed to the callback function. <ul> <li><code>OnRaw(line) - (any non false/nil return value assumes line handled and will not be further processed)</code></li> <li><code>OnDisconnect(message, errorOccurred)</code></li> <li><code>OnChat(user, channel, message)</code></li> <li><code>OnNotice(user, channel, message)</code></li> <li><code>OnJoin(user, channel)</code>*</li> <li><code>OnPart(user, channel)</code>*</li> <li><code>OnQuit(user, message)</code></li> <li><code>NickChange(user, newnick, channel)</code>*†</li> <li><code>NameList(channel, names)</code></li> <li><code>OnTopic(channel, topic)</code></li> <li><code>OnTopicInfo(channel, creator, timeCreated)</code></li> <li><code>OnKick(channel, nick, kicker, reason)</code>* (kicker is a <code>user</code> table)</li> <li><code>OnUserModeIs(modes)</code></li> <li><code>OnChannelModeIs(user, channel, modes)</code></li> <li><code>OnModeChange(user, target, modes)</code>*</li> </ul> * Event also invoked for yourself. † Channel passed only when user tracking is enabled