initial commit

This commit is contained in:
Diego Martínez
2012-12-01 01:06:15 -02:00
commit dfab9bbcd4
187 changed files with 51600 additions and 0 deletions

7
doc/luairc/LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2007 Jesse Luehrs
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

31
doc/luairc/README Normal file
View File

@ -0,0 +1,31 @@
LuaIRC v0.3
Jesse Luehrs (jluehrs2@uiuc.edu)
OVERVIEW
========
LuaIRC is a fully featured IRC framework written entirely in Lua. It provides an event driven system for connecting to IRC servers and responding to actions such as messages, joins/parts, and channel mode changes, among other things. DCC SEND is also fully implemented, both for sending and receiving files.
INSTALL
=======
This module requires LuaSocket (http://www.cs.princeton.edu/~diego/professional/luasocket/) and Lua 5.1. To install, modify the Make.config file with paths appropriate to your system and run 'make install'.
DOCUMENTATION
=============
Documentation of the API can be found in the doc/ directory. It was autogenerated from the source files by LuaDoc (http://luadoc.luaforge.net/).
LuaIRC has only been tested on Freenode so far, but I plan to expand this to other servers in the future. It's quite possible that it works on other servers anyway, however, so feel free to try it out, and send in bug reports for things that break.
CHANGES
=======
0.3
- Major cleanup and restructuring again, documentation added, first public release
0.2
- Major cleanup and restructuring
0.1
- Initial implementation, enough to get it talking to the IRC server
COPYRIGHT AND LICENSE
=====================
Copyright (C) 2007 Jesse Luehrs
This code is distributed under the MIT license; a copy is in the LICENSE file distributed with the source.

20
doc/luairc/TODO Normal file
View File

@ -0,0 +1,20 @@
- Reorganize the modules a bit more... we should have a src/irc/dcc/send.lua, src/irc/ctcp/base.lua, src/irc/ctcp/dcc.lua, etc. also, most (all?) of the handlers should be moved out of irc.lua into, say, src/irc/base.lua
- Separate out the DCC module some more so that the callbacks aren't registered unless the module is loaded
- Also separate out all of the CTCP commands/callbacks into the CTCP module
- Rework the way irc.lua uses things from modules - the whole underscore but public thing... do i want to keep that? i suppose it's not horrible... look into this more
- Implement callbacks for user mode changes (need to figure out how to represent users in the callback info)
- Allow a server parameter in whois() so that the returned data can include the user's idle time
- chan:ban()/chan:unban() should take a usermask, not a nick, or be able to generate a usermask from a nick, or something like that
- Clean up misc.split
- Implement DCC CHAT
- Implement DCC XMIT/OFFER
- Implement some more of the newer CTCP commands
- Implement more information requests
- who
- whowas
- info
- stats
- links
- trace (not freenode supported)
- Implement XDCC (?)
- Handle endianness in the IP address conversion functions

156
doc/luairc/index.html Normal file
View File

@ -0,0 +1,156 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><strong>Index</strong></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="modules/irc.html">irc</a>
</li>
<li>
<a href="modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div> <!-- id="navigation" -->
<div id="content">
<h2>Modules</h2>
<table class="module_list">
<!--<tr><td colspan="2">Modules</td></tr>-->
<tr>
<td class="name"><a href="modules/callbacks.html">callbacks</a></td>
<td class="summary">These are the callbacks that are available to register.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.html">irc</a></td>
<td class="summary">LuaIRC - IRC framework written in Lua </td>
</tr>
<tr>
<td class="name"><a href="modules/irc.channel.html">irc.channel</a></td>
<td class="summary">This module implements a channel object representing a single channel we have joined.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.constants.html">irc.constants</a></td>
<td class="summary">This module holds various constants used by the IRC protocol.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.ctcp.html">irc.ctcp</a></td>
<td class="summary">This module implements the various quoting and escaping requirements of the CTCP protocol.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.dcc.html">irc.dcc</a></td>
<td class="summary">This module implements the DCC protocol.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.debug.html">irc.debug</a></td>
<td class="summary">This module implements a few useful debug functions for use throughout the rest of the code.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.message.html">irc.message</a></td>
<td class="summary">This module contains parsing functions for IRC server messages.</td>
</tr>
<tr>
<td class="name"><a href="modules/irc.misc.html">irc.misc</a></td>
<td class="summary">This module contains various useful functions which didn't fit in any of the other modules.</td>
</tr>
</table>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

286
doc/luairc/luadoc.css Normal file
View File

@ -0,0 +1,286 @@
body {
margin-left: 1em;
margin-right: 1em;
font-family: arial, helvetica, geneva, sans-serif;
background-color:#ffffff; margin:0px;
}
code {
font-family: "Andale Mono", monospace;
}
tt {
font-family: "Andale Mono", monospace;
}
body, td, th { font-size: 11pt; }
h1, h2, h3, h4 { margin-left: 0em; }
textarea, pre, tt { font-size:10pt; }
body, td, th { color:#000000; }
small { font-size:0.85em; }
h1 { font-size:1.5em; }
h2 { font-size:1.25em; }
h3 { font-size:1.15em; }
h4 { font-size:1.06em; }
a:link { font-weight:bold; color: #004080; text-decoration: none; }
a:visited { font-weight:bold; color: #006699; text-decoration: none; }
a:link:hover { text-decoration:underline; }
hr { color:#cccccc }
img { border-width: 0px; }
h3 { padding-top: 1em; }
p { margin-left: 1em; }
p.name {
font-family: "Andale Mono", monospace;
padding-top: 1em;
margin-left: 0em;
}
blockquote { margin-left: 3em; }
pre.example {
background-color: rgb(245, 245, 245);
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: silver;
border-right-color: silver;
border-bottom-color: silver;
border-left-color: silver;
padding: 1em;
margin-left: 1em;
margin-right: 1em;
font-family: "Andale Mono", monospace;
font-size: smaller;
}
hr {
margin-left: 0em;
background: #00007f;
border: 0px;
height: 1px;
}
ul { list-style-type: disc; }
table.index { border: 1px #00007f; }
table.index td { text-align: left; vertical-align: top; }
table.index ul { padding-top: 0em; margin-top: 0em; }
table {
border: 1px solid black;
border-collapse: collapse;
margin-left: auto;
margin-right: auto;
}
th {
border: 1px solid black;
padding: 0.5em;
}
td {
border: 1px solid black;
padding: 0.5em;
}
div.header, div.footer { margin-left: 0em; }
#container
{
margin-left: 1em;
margin-right: 1em;
background-color: #f0f0f0;
}
#product
{
text-align: center;
border-bottom: 1px solid #cccccc;
background-color: #ffffff;
}
#product big {
font-size: 2em;
}
#product_logo
{
}
#product_name
{
}
#product_description
{
}
#main
{
background-color: #f0f0f0;
border-left: 2px solid #cccccc;
}
#navigation
{
float: left;
width: 18em;
margin: 0;
vertical-align: top;
background-color: #f0f0f0;
overflow:visible;
}
#navigation h1 {
background-color:#e7e7e7;
font-size:1.1em;
color:#000000;
text-align:left;
margin:0px;
padding:0.2em;
border-top:1px solid #dddddd;
border-bottom:1px solid #dddddd;
}
#navigation ul
{
font-size:1em;
list-style-type: none;
padding: 0;
margin: 1px;
}
#navigation li
{
text-indent: -1em;
margin: 0em 0em 0em 0.5em;
display: block;
padding: 3px 0px 0px 12px;
}
#navigation li li a
{
padding: 0px 3px 0px -1em;
}
#content
{
margin-left: 18em;
padding: 1em;
border-left: 2px solid #cccccc;
border-right: 2px solid #cccccc;
background-color: #ffffff;
}
#about
{
clear: both;
margin: 0;
padding: 5px;
border-top: 2px solid #cccccc;
background-color: #ffffff;
}
@media print {
body {
font: 12pt "Times New Roman", "TimeNR", Times, serif;
}
a { font-weight:bold; color: #004080; text-decoration: underline; }
#main
{
background-color: #ffffff;
border-left: 0px;
}
#container
{
margin-left: 2%;
margin-right: 2%;
background-color: #ffffff;
}
#content
{
margin-left: 0px;
padding: 1em;
border-left: 0px;
border-right: 0px;
background-color: #ffffff;
}
#navigation
{
display: none;
}
pre.example {
font-family: "Andale Mono", monospace;
font-size: 10pt;
page-break-inside: avoid;
}
}
table.module_list td
{
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #cccccc;
}
table.module_list td.name { background-color: #f0f0f0; }
table.module_list td.summary { width: 100%; }
table.file_list
{
border-width: 1px;
border-style: solid;
border-color: #cccccc;
border-collapse: collapse;
}
table.file_list td
{
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #cccccc;
}
table.file_list td.name { background-color: #f0f0f0; }
table.file_list td.summary { width: 100%; }
table.function_list
{
border-width: 1px;
border-style: solid;
border-color: #cccccc;
border-collapse: collapse;
}
table.function_list td
{
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #cccccc;
}
table.function_list td.name { background-color: #f0f0f0; }
table.function_list td.summary { width: 100%; }
table.table_list
{
border-width: 1px;
border-style: solid;
border-color: #cccccc;
border-collapse: collapse;
}
table.table_list td

View File

@ -0,0 +1,858 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li><strong>callbacks</strong></li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>callbacks</code></h1>
<p>These are the callbacks that are available to register.</p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#channel_act">channel_act</a>&nbsp;(channel, from, message)</td>
<td class="summary">This callback is triggered whenever a user performs a CTCP ACTION in a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#channel_msg">channel_msg</a>&nbsp;(channel, from, message)</td>
<td class="summary">This callback is triggered whenever a user sends a message to a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#channel_notice">channel_notice</a>&nbsp;(channel, from, message)</td>
<td class="summary">This callback is triggered whenever a user sends a notice to a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#connect">connect</a>&nbsp;()</td>
<td class="summary">This callback is triggered when the connection has completed.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ctcp_error">ctcp_error</a>&nbsp;(from, to, message)</td>
<td class="summary">This callback is triggered when a CTCP command resulted in an error (for example, if the remote client doesn't implement that CTCP command).</td>
</tr>
<tr>
<td class="name" nowrap><a href="#dcc_send">dcc_send</a>&nbsp;(from, to, filename, address, port, filesize)</td>
<td class="summary">This callback is triggered when a user offers to send you a file using DCC SEND.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#deop">deop</a>&nbsp;(channel, from, to)</td>
<td class="summary">This callback is triggered whenever somebody loses ops.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#devoice">devoice</a>&nbsp;(channel, from, to)</td>
<td class="summary">This callback is triggered whenever somebody loses voice.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#invite">invite</a>&nbsp;(from, channel)</td>
<td class="summary">This callback is triggered whenever an invite to a channel is received.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#join">join</a>&nbsp;(channel, from)</td>
<td class="summary">This callback is triggered when a user joins a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#kick">kick</a>&nbsp;(channel, to, from)</td>
<td class="summary">This callback is triggered when a user is kicked from a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#me_join">me_join</a>&nbsp;(channel)</td>
<td class="summary">This callback is triggered after a join() command completes.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#nick_change">nick_change</a>&nbsp;(from, old_nick)</td>
<td class="summary">This callback is triggered when a user changes their nick.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#op">op</a>&nbsp;(channel, from, to)</td>
<td class="summary">This callback is triggered when a user is opped.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#part">part</a>&nbsp;(channel, from, message)</td>
<td class="summary">This callback is triggered when a user leaves a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#private_act">private_act</a>&nbsp;(from, message)</td>
<td class="summary">This callback is triggered when a user sends a CTCP ACTION in a private message.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#private_msg">private_msg</a>&nbsp;(from, message)</td>
<td class="summary">This callback is triggered when a user sends a private message.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#private_notice">private_notice</a>&nbsp;(from, message)</td>
<td class="summary">This callback is triggered when a user sends a private notice.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#quit">quit</a>&nbsp;(from, message)</td>
<td class="summary">This callback is triggered when a user quits.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#topic_change">topic_change</a>&nbsp;(channel)</td>
<td class="summary">This callback is triggered when a user changes the topic in a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#voice">voice</a>&nbsp;(channel, from, to)</td>
<td class="summary">This callback is triggered when a user is voiced.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="channel_act"></a><strong>channel_act</strong>&nbsp;(channel, from, message)</dt>
<dd>
This callback is triggered whenever a user performs a CTCP ACTION in a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the action was performed
</li>
<li>
from: User who performed the action
</li>
<li>
message: The action which was performed
</li>
</ul>
</dd>
<dt><a name="channel_msg"></a><strong>channel_msg</strong>&nbsp;(channel, from, message)</dt>
<dd>
This callback is triggered whenever a user sends a message to a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the message was sent
</li>
<li>
from: User who sent the message
</li>
<li>
message: The message which was sent
</li>
</ul>
</dd>
<dt><a name="channel_notice"></a><strong>channel_notice</strong>&nbsp;(channel, from, message)</dt>
<dd>
This callback is triggered whenever a user sends a notice to a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the notice was sent
</li>
<li>
from: User who sent the message
</li>
<li>
message: The notice which was sent
</li>
</ul>
</dd>
<dt><a name="connect"></a><strong>connect</strong>&nbsp;()</dt>
<dd>
This callback is triggered when the connection has completed.
</dd>
<dt><a name="ctcp_error"></a><strong>ctcp_error</strong>&nbsp;(from, to, message)</dt>
<dd>
This callback is triggered when a CTCP command resulted in an error (for example, if the remote client doesn't implement that CTCP command).
<h3>Parameters</h3>
<ul>
<li>
from: User who sent the error response
</li>
<li>
to: Who the response was sent to (either you or a channel you are in)
</li>
<li>
message: A description of the error
</li>
</ul>
</dd>
<dt><a name="dcc_send"></a><strong>dcc_send</strong>&nbsp;(from, to, filename, address, port, filesize)</dt>
<dd>
This callback is triggered when a user offers to send you a file using DCC SEND. It allows you to determine whether or not you want to accept the file.
<h3>Parameters</h3>
<ul>
<li>
from: User offering the file
</li>
<li>
to: User who is being offered the file (likely yourself)
</li>
<li>
filename: Name of the file being offered
</li>
<li>
address: IP address of the user offering the file
</li>
<li>
port: Port to connect to at that address
</li>
<li>
filesize: Size of the file being offered
</li>
</ul>
<h3>Return value:</h3>
True to accept the file, false to reject it
</dd>
<dt><a name="deop"></a><strong>deop</strong>&nbsp;(channel, from, to)</dt>
<dd>
This callback is triggered whenever somebody loses ops.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the user lost ops
</li>
<li>
from: User who removed the ops
</li>
<li>
to: User who lost ops
</li>
</ul>
</dd>
<dt><a name="devoice"></a><strong>devoice</strong>&nbsp;(channel, from, to)</dt>
<dd>
This callback is triggered whenever somebody loses voice.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the user lost voice
</li>
<li>
from: User who removed the voice
</li>
<li>
to: User who lost voice
</li>
</ul>
</dd>
<dt><a name="invite"></a><strong>invite</strong>&nbsp;(from, channel)</dt>
<dd>
This callback is triggered whenever an invite to a channel is received.
<h3>Parameters</h3>
<ul>
<li>
from: User who sent the invite
</li>
<li>
channel: Channel name that the invite was to
</li>
</ul>
</dd>
<dt><a name="join"></a><strong>join</strong>&nbsp;(channel, from)</dt>
<dd>
This callback is triggered when a user joins a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where there was a join
</li>
<li>
from: User who joined
</li>
</ul>
</dd>
<dt><a name="kick"></a><strong>kick</strong>&nbsp;(channel, to, from)</dt>
<dd>
This callback is triggered when a user is kicked from a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where there was a kick
</li>
<li>
to: User who was kicked
</li>
<li>
from: User who did the kicking
</li>
</ul>
</dd>
<dt><a name="me_join"></a><strong>me_join</strong>&nbsp;(channel)</dt>
<dd>
This callback is triggered after a join() command completes.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for the joined channel
</li>
</ul>
</dd>
<dt><a name="nick_change"></a><strong>nick_change</strong>&nbsp;(from, old_nick)</dt>
<dd>
This callback is triggered when a user changes their nick.
<h3>Parameters</h3>
<ul>
<li>
from: User who changed their nick
</li>
<li>
old_nick: The previous nick of that user
</li>
</ul>
</dd>
<dt><a name="op"></a><strong>op</strong>&nbsp;(channel, from, to)</dt>
<dd>
This callback is triggered when a user is opped.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the user was opped
</li>
<li>
from: User who gave the ops
</li>
<li>
to: User who was opped
</li>
</ul>
</dd>
<dt><a name="part"></a><strong>part</strong>&nbsp;(channel, from, message)</dt>
<dd>
This callback is triggered when a user leaves a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the part occurred
</li>
<li>
from: User who left
</li>
<li>
message: Part message from the user
</li>
</ul>
</dd>
<dt><a name="private_act"></a><strong>private_act</strong>&nbsp;(from, message)</dt>
<dd>
This callback is triggered when a user sends a CTCP ACTION in a private message.
<h3>Parameters</h3>
<ul>
<li>
from: User who sent the action
</li>
<li>
message: The action that was sent
</li>
</ul>
</dd>
<dt><a name="private_msg"></a><strong>private_msg</strong>&nbsp;(from, message)</dt>
<dd>
This callback is triggered when a user sends a private message.
<h3>Parameters</h3>
<ul>
<li>
from: User who sent the message
</li>
<li>
message: The message that was sent
</li>
</ul>
</dd>
<dt><a name="private_notice"></a><strong>private_notice</strong>&nbsp;(from, message)</dt>
<dd>
This callback is triggered when a user sends a private notice.
<h3>Parameters</h3>
<ul>
<li>
from: User who sent the notice
</li>
<li>
message: The notice that was sent
</li>
</ul>
</dd>
<dt><a name="quit"></a><strong>quit</strong>&nbsp;(from, message)</dt>
<dd>
This callback is triggered when a user quits.
<h3>Parameters</h3>
<ul>
<li>
from: User who quit
</li>
<li>
message: The user's quit message
</li>
</ul>
</dd>
<dt><a name="topic_change"></a><strong>topic_change</strong>&nbsp;(channel)</dt>
<dd>
This callback is triggered when a user changes the topic in a channel. The contents of the topic can be seen in the <i>topic</i> field of the channel object.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the topic was changed.
</li>
</ul>
</dd>
<dt><a name="voice"></a><strong>voice</strong>&nbsp;(channel, from, to)</dt>
<dd>
This callback is triggered when a user is voiced.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel object for where the user was voiced
</li>
<li>
from: User who gave the voice
</li>
<li>
to: User who was voiced
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,945 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li><strong>irc.channel</strong></li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.channel</code></h1>
<p>This module implements a channel object representing a single channel we have joined.</p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#ban">ban</a>&nbsp;(self, name)</td>
<td class="summary">Ban a user from a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#contains">contains</a>&nbsp;(self, nick)</td>
<td class="summary">Test if a user is in the channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#deop">deop</a>&nbsp;(self, name)</td>
<td class="summary">Remove ops from a user.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#devoice">devoice</a>&nbsp;(self, name)</td>
<td class="summary">Remove voice from a user.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#each_member">each_member</a>&nbsp;(self)</td>
<td class="summary">Iterator over all users in the channel </td>
</tr>
<tr>
<td class="name" nowrap><a href="#each_op">each_op</a>&nbsp;(self)</td>
<td class="summary">Iterator over the ops in the channel </td>
</tr>
<tr>
<td class="name" nowrap><a href="#each_user">each_user</a>&nbsp;(self)</td>
<td class="summary">Iterator over the normal users in the channel </td>
</tr>
<tr>
<td class="name" nowrap><a href="#each_voice">each_voice</a>&nbsp;(self)</td>
<td class="summary">Iterator over the voiced users in the channel </td>
</tr>
<tr>
<td class="name" nowrap><a href="#members">members</a>&nbsp;(self)</td>
<td class="summary">Gets an array of all the users in the channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new">new</a>&nbsp;(chan)</td>
<td class="summary">Creates a new Channel object.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#op">op</a>&nbsp;(self, name)</td>
<td class="summary">Give a user ops on a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ops">ops</a>&nbsp;(self)</td>
<td class="summary">Gets an array of all the ops in the channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_invite_only">set_invite_only</a>&nbsp;(self, set)</td>
<td class="summary">Set whether joining the channel requires an invite.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_key">set_key</a>&nbsp;(self, key)</td>
<td class="summary">Set a channel password.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_limit">set_limit</a>&nbsp;(self, new_limit)</td>
<td class="summary">Set a channel limit.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_moderated">set_moderated</a>&nbsp;(self, set)</td>
<td class="summary">Set whether voice is required to speak.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_no_outside_messages">set_no_outside_messages</a>&nbsp;(self, set)</td>
<td class="summary">If true, users must be in the channel to send messages to it.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_private">set_private</a>&nbsp;(self, set)</td>
<td class="summary">Set the private state of a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_secret">set_secret</a>&nbsp;(self, set)</td>
<td class="summary">Set the secret state of a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_topic_lock">set_topic_lock</a>&nbsp;(self, set)</td>
<td class="summary">If true, the topic can only be changed by an op.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#unban">unban</a>&nbsp;(self, name)</td>
<td class="summary">Remove a ban on a user.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#users">users</a>&nbsp;(self)</td>
<td class="summary">Gets an array of all the normal users in the channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#voice">voice</a>&nbsp;(self, name)</td>
<td class="summary">Give a user voice on a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#voices">voices</a>&nbsp;(self)</td>
<td class="summary">Gets an array of all the voiced users in the channel.</td>
</tr>
</table>
<h2>Tables</h2>
<table class="table_list">
<tr>
<td class="name" nowrap><a href="#Channel">Channel</a></td>
<td class="summary">An object of the Channel class represents a single joined channel.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="ban"></a><strong>ban</strong>&nbsp;(self, name)</dt>
<dd>
Ban a user from a channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
name: User to ban
</li>
</ul>
</dd>
<dt><a name="contains"></a><strong>contains</strong>&nbsp;(self, nick)</dt>
<dd>
Test if a user is in the channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
nick: Nick to search for
</li>
</ul>
<h3>Return value:</h3>
True if the nick is in the channel, false otherwise
</dd>
<dt><a name="deop"></a><strong>deop</strong>&nbsp;(self, name)</dt>
<dd>
Remove ops from a user.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
name: User to remove ops from
</li>
</ul>
</dd>
<dt><a name="devoice"></a><strong>devoice</strong>&nbsp;(self, name)</dt>
<dd>
Remove voice from a user.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
name: User to remove voice from
</li>
</ul>
</dd>
<dt><a name="each_member"></a><strong>each_member</strong>&nbsp;(self)</dt>
<dd>
Iterator over all users in the channel
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
</dd>
<dt><a name="each_op"></a><strong>each_op</strong>&nbsp;(self)</dt>
<dd>
Iterator over the ops in the channel
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
</dd>
<dt><a name="each_user"></a><strong>each_user</strong>&nbsp;(self)</dt>
<dd>
Iterator over the normal users in the channel
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
</dd>
<dt><a name="each_voice"></a><strong>each_voice</strong>&nbsp;(self)</dt>
<dd>
Iterator over the voiced users in the channel
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
</dd>
<dt><a name="members"></a><strong>members</strong>&nbsp;(self)</dt>
<dd>
Gets an array of all the users in the channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
<h3>Return value:</h3>
Array of channel users
</dd>
<dt><a name="new"></a><strong>new</strong>&nbsp;(chan)</dt>
<dd>
Creates a new Channel object.
<h3>Parameters</h3>
<ul>
<li>
chan: Name of the new channel
</li>
</ul>
<h3>Return value:</h3>
The new channel instance
</dd>
<dt><a name="op"></a><strong>op</strong>&nbsp;(self, name)</dt>
<dd>
Give a user ops on a channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
name: User to op
</li>
</ul>
</dd>
<dt><a name="ops"></a><strong>ops</strong>&nbsp;(self)</dt>
<dd>
Gets an array of all the ops in the channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
<h3>Return value:</h3>
Array of channel ops
</dd>
<dt><a name="set_invite_only"></a><strong>set_invite_only</strong>&nbsp;(self, set)</dt>
<dd>
Set whether joining the channel requires an invite.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
set: True to set the channel invite only, false to unset it
</li>
</ul>
</dd>
<dt><a name="set_key"></a><strong>set_key</strong>&nbsp;(self, key)</dt>
<dd>
Set a channel password.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
key: New channel password (optional; password is unset if this argument isn't passed)
</li>
</ul>
</dd>
<dt><a name="set_limit"></a><strong>set_limit</strong>&nbsp;(self, new_limit)</dt>
<dd>
Set a channel limit.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
new_limit: New value for the channel limit (optional; limit is unset if this argument isn't passed)
</li>
</ul>
</dd>
<dt><a name="set_moderated"></a><strong>set_moderated</strong>&nbsp;(self, set)</dt>
<dd>
Set whether voice is required to speak.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
set: True to set the channel as moderated, false to unset it
</li>
</ul>
</dd>
<dt><a name="set_no_outside_messages"></a><strong>set_no_outside_messages</strong>&nbsp;(self, set)</dt>
<dd>
If true, users must be in the channel to send messages to it.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
set: True to require users to be in the channel to send messages to it, false to remove this restriction
</li>
</ul>
</dd>
<dt><a name="set_private"></a><strong>set_private</strong>&nbsp;(self, set)</dt>
<dd>
Set the private state of a channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
set: True to set the channel as private, false to unset it
</li>
</ul>
</dd>
<dt><a name="set_secret"></a><strong>set_secret</strong>&nbsp;(self, set)</dt>
<dd>
Set the secret state of a channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
set: True to set the channel as secret, false to unset it
</li>
</ul>
</dd>
<dt><a name="set_topic_lock"></a><strong>set_topic_lock</strong>&nbsp;(self, set)</dt>
<dd>
If true, the topic can only be changed by an op.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
set: True to lock the topic, false to unlock it
</li>
</ul>
</dd>
<dt><a name="unban"></a><strong>unban</strong>&nbsp;(self, name)</dt>
<dd>
Remove a ban on a user.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
name: User to unban
</li>
</ul>
</dd>
<dt><a name="users"></a><strong>users</strong>&nbsp;(self)</dt>
<dd>
Gets an array of all the normal users in the channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
<h3>Return value:</h3>
Array of channel normal users
</dd>
<dt><a name="voice"></a><strong>voice</strong>&nbsp;(self, name)</dt>
<dd>
Give a user voice on a channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
<li>
name: User to give voice to
</li>
</ul>
</dd>
<dt><a name="voices"></a><strong>voices</strong>&nbsp;(self)</dt>
<dd>
Gets an array of all the voiced users in the channel.
<h3>Parameters</h3>
<ul>
<li>
self: Channel object
</li>
</ul>
<h3>Return value:</h3>
Array of channel voiced users
</dd>
</dl>
<h2><a name="tables"></a>Tables</h2>
<dl class="table">
<dt><a name="Channel"></a><strong>Channel</strong></dt>
<dd>An object of the Channel class represents a single joined channel. It has several table fields, and can be used in string contexts (returning the channel name).<br />
<em>Fields</em>
<ul>
<li>
name: Name of the channel (read only)
</li>
<li>
topic: Channel topic, if set (read/write, writing to this sends a topic change request to the server for this channel)
</li>
<li>
chanmode: Channel mode (public/private/secret) (read only)
</li>
<li>
members: Array of all members of this channel
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li><strong>irc.constants</strong></li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.constants</code></h1>
<p>This module holds various constants used by the IRC protocol.</p>
<br/>
<br/>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li><strong>irc.ctcp</strong></li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.ctcp</code></h1>
<p>This module implements the various quoting and escaping requirements of the CTCP protocol.</p>
<br/>
<br/>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,164 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li><strong>irc.dcc</strong></li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.dcc</code></h1>
<p>This module implements the DCC protocol. File transfers (DCC SEND) are handled, but DCC CHAT is not, as of yet.</p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#send">send</a>&nbsp;(nick, filename, port)</td>
<td class="summary">Offers a file to a remote user.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="send"></a><strong>send</strong>&nbsp;(nick, filename, port)</dt>
<dd>
Offers a file to a remote user.
<h3>Parameters</h3>
<ul>
<li>
nick: User to offer the file to
</li>
<li>
filename: Filename to offer
</li>
<li>
port: Port to accept connections on (optional, defaults to choosing an available port between FIRST_PORT and LAST_PORT above)
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,196 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li><strong>irc.debug</strong></li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.debug</code></h1>
<p>This module implements a few useful debug functions for use throughout the rest of the code.</p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#disable">disable</a>&nbsp;()</td>
<td class="summary">Turns off debug output.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#enable">enable</a>&nbsp;()</td>
<td class="summary">Turns on debug output.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_output">set_output</a>&nbsp;(file)</td>
<td class="summary">Redirects output to a file rather than stdout.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="disable"></a><strong>disable</strong>&nbsp;()</dt>
<dd>
Turns off debug output.
</dd>
<dt><a name="enable"></a><strong>enable</strong>&nbsp;()</dt>
<dd>
Turns on debug output.
</dd>
<dt><a name="set_output"></a><strong>set_output</strong>&nbsp;(file)</dt>
<dd>
Redirects output to a file rather than stdout.
<h3>Parameters</h3>
<ul>
<li>
file: File to write debug output to
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

683
doc/luairc/modules/irc.html Normal file
View File

@ -0,0 +1,683 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li><strong>irc</strong></li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc</code></h1>
<p>LuaIRC - IRC framework written in Lua</p>
<p><small><b>Release:</b> 0.3</small></p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#act">act</a>&nbsp;(name, action)</td>
<td class="summary">Perform a /me action.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#channels">channels</a>&nbsp;()</td>
<td class="summary">Iterate over currently joined channels.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#connect">connect</a>&nbsp;(args)</td>
<td class="summary">Start a connection to the irc server.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ctcp_ping">ctcp_ping</a>&nbsp;(cb, nick)</td>
<td class="summary">Send a CTCP ping request.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ctcp_time">ctcp_time</a>&nbsp;(cb, nick)</td>
<td class="summary">Send a localtime request.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ctcp_version">ctcp_version</a>&nbsp;(cb, nick)</td>
<td class="summary">Send a client version request.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_ip">get_ip</a>&nbsp;()</td>
<td class="summary">Get the local IP address for the server connection.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#join">join</a>&nbsp;(channel)</td>
<td class="summary">Join a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#notice">notice</a>&nbsp;(name, message)</td>
<td class="summary">Send a notice to a user or channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#part">part</a>&nbsp;(channel)</td>
<td class="summary">Leave a channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#quit">quit</a>&nbsp;(message)</td>
<td class="summary">Close the connection to the irc server.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#register_callback">register_callback</a>&nbsp;(name, fn)</td>
<td class="summary">Register a user function to be called when a specific event occurs.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#say">say</a>&nbsp;(name, message)</td>
<td class="summary">Send a message to a user or channel.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#send">send</a>&nbsp;(command, ...)</td>
<td class="summary">Send a raw IRC command.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#server_time">server_time</a>&nbsp;(cb)</td>
<td class="summary">Request the current time of the server you are connected to.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#server_version">server_version</a>&nbsp;(cb)</td>
<td class="summary">Request the version of the IRC server you are currently connected to.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_ip">set_ip</a>&nbsp;(new_ip)</td>
<td class="summary">Set the local IP manually (to allow for NAT workarounds) </td>
</tr>
<tr>
<td class="name" nowrap><a href="#whois">whois</a>&nbsp;(cb, nick)</td>
<td class="summary">Request WHOIS information about a given user.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="act"></a><strong>act</strong>&nbsp;(name, action)</dt>
<dd>
Perform a /me action.
<h3>Parameters</h3>
<ul>
<li>
name: User or channel to send the action to
</li>
<li>
action: Action to send
</li>
</ul>
</dd>
<dt><a name="channels"></a><strong>channels</strong>&nbsp;()</dt>
<dd>
Iterate over currently joined channels. channels() is an iterator function for use in for loops. For example, <pre>for chan in irc.channels() do print(chan:name) end</pre>
<em>See also:</em>
<a href="../modules/irc.channel.html">
irc.channel
</a>
</dd>
<dt><a name="connect"></a><strong>connect</strong>&nbsp;(args)</dt>
<dd>
Start a connection to the irc server.
<h3>Parameters</h3>
<ul>
<li>
args: Table of named arguments containing connection parameters. Defaults are the all-caps versions of these parameters given at the top of the file, and are overridable by setting them as well, i.e. <pre>irc.NETWORK = irc.freenode.net</pre> Possible options are: <ul> <li><i>network:</i> address of the irc network to connect to (default: 'localhost')</li> <li><i>port:</i> port to connect to (default: '6667')</li> <li><i>pass:</i> irc server password (default: don't send)</li> <li><i>nick:</i> nickname to connect as (default: 'luabot')</li> <li><i>username:</i> username to connect with (default: 'LuaIRC')</li> <li><i>realname:</i> realname to connect with (default: 'LuaIRC')</li> <li><i>timeout:</i> amount of time in seconds to wait before dropping an idle connection (default: '60')</li> </ul>
</li>
</ul>
</dd>
<dt><a name="ctcp_ping"></a><strong>ctcp_ping</strong>&nbsp;(cb, nick)</dt>
<dd>
Send a CTCP ping request.
<h3>Parameters</h3>
<ul>
<li>
cb: Callback to call when the information is available. The single table parameter to this callback will contain the fields: <ul> <li><i>nick:</i> the nick which responded to the request</li> <li><i>time:</i> the roundtrip ping time, in seconds</li> </ul>
</li>
<li>
nick: User to ping
</li>
</ul>
</dd>
<dt><a name="ctcp_time"></a><strong>ctcp_time</strong>&nbsp;(cb, nick)</dt>
<dd>
Send a localtime request.
<h3>Parameters</h3>
<ul>
<li>
cb: Callback to call when the information is available. The single table parameter to this callback will contain the fields: <ul> <li><i>nick:</i> the nick which responded to the request</li> <li><i>time:</i> the localtime reported by the remote client</li> </ul>
</li>
<li>
nick: User to request the localtime from
</li>
</ul>
</dd>
<dt><a name="ctcp_version"></a><strong>ctcp_version</strong>&nbsp;(cb, nick)</dt>
<dd>
Send a client version request.
<h3>Parameters</h3>
<ul>
<li>
cb: Callback to call when the information is available. The single table parameter to this callback will contain the fields: <ul> <li><i>nick:</i> the nick which responded to the request</li> <li><i>version:</i> the version reported by the remote client</li> </ul>
</li>
<li>
nick: User to request the client version from
</li>
</ul>
</dd>
<dt><a name="get_ip"></a><strong>get_ip</strong>&nbsp;()</dt>
<dd>
Get the local IP address for the server connection.
<h3>Return value:</h3>
A string representation of the local IP address that the IRC server connection is communicating on
</dd>
<dt><a name="join"></a><strong>join</strong>&nbsp;(channel)</dt>
<dd>
Join a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel to join
</li>
</ul>
</dd>
<dt><a name="notice"></a><strong>notice</strong>&nbsp;(name, message)</dt>
<dd>
Send a notice to a user or channel.
<h3>Parameters</h3>
<ul>
<li>
name: User or channel to send the notice to
</li>
<li>
message: Message to send
</li>
</ul>
</dd>
<dt><a name="part"></a><strong>part</strong>&nbsp;(channel)</dt>
<dd>
Leave a channel.
<h3>Parameters</h3>
<ul>
<li>
channel: Channel to leave
</li>
</ul>
</dd>
<dt><a name="quit"></a><strong>quit</strong>&nbsp;(message)</dt>
<dd>
Close the connection to the irc server.
<h3>Parameters</h3>
<ul>
<li>
message: Quit message (optional, defaults to 'Leaving')
</li>
</ul>
</dd>
<dt><a name="register_callback"></a><strong>register_callback</strong>&nbsp;(name, fn)</dt>
<dd>
Register a user function to be called when a specific event occurs.
<h3>Parameters</h3>
<ul>
<li>
name: Name of the event
</li>
<li>
fn: Function to call when the event occurs, or nil to clear the callback for this event
</li>
</ul>
<h3>Return value:</h3>
Value of the original callback for this event (or nil if no previous callback had been set)
</dd>
<dt><a name="say"></a><strong>say</strong>&nbsp;(name, message)</dt>
<dd>
Send a message to a user or channel.
<h3>Parameters</h3>
<ul>
<li>
name: User or channel to send the message to
</li>
<li>
message: Message to send
</li>
</ul>
</dd>
<dt><a name="send"></a><strong>send</strong>&nbsp;(command, ...)</dt>
<dd>
Send a raw IRC command.
<h3>Parameters</h3>
<ul>
<li>
command: String containing the raw IRC command
</li>
<li>
...: Arguments to the command. Each argument is either a string or an array. Strings are sent literally, arrays are CTCP quoted as a group. The last argument (if it exists) is preceded by a : (so it may contain spaces).
</li>
</ul>
</dd>
<dt><a name="server_time"></a><strong>server_time</strong>&nbsp;(cb)</dt>
<dd>
Request the current time of the server you are connected to.
<h3>Parameters</h3>
<ul>
<li>
cb: Callback to call when the information is available. The single table parameter to this callback will contain the fields: <ul> <li><i>server:</i> the server which responded to the request</li> <li><i>time:</i> the time reported by the server</li> </ul>
</li>
</ul>
</dd>
<dt><a name="server_version"></a><strong>server_version</strong>&nbsp;(cb)</dt>
<dd>
Request the version of the IRC server you are currently connected to.
<h3>Parameters</h3>
<ul>
<li>
cb: Callback to call when the information is available. The single table parameter to this callback will contain the fields: <ul> <li><i>server:</i> the server which responded to the request</li> <li><i>version:</i> the server version</li> <li><i>comments:</i> other data provided by the server</li> </ul>
</li>
</ul>
</dd>
<dt><a name="set_ip"></a><strong>set_ip</strong>&nbsp;(new_ip)</dt>
<dd>
Set the local IP manually (to allow for NAT workarounds)
<h3>Parameters</h3>
<ul>
<li>
new_ip: IP address to set
</li>
</ul>
</dd>
<dt><a name="whois"></a><strong>whois</strong>&nbsp;(cb, nick)</dt>
<dd>
Request WHOIS information about a given user.
<h3>Parameters</h3>
<ul>
<li>
cb: Callback to call when the information is available. The single table parameter to this callback may contain any or all of the fields: <ul> <li><i>nick:</i> the nick that was passed to this function (this field will always be here)</li> <li><i>user:</i> the IRC username of the user</li> <li><i>host:</i> the user's hostname</li> <li><i>realname:</i> the IRC realname of the user</li> <li><i>server:</i> the IRC server the user is connected to</li> <li><i>serverinfo:</i> arbitrary information about the above server</li> <li><i>awaymsg:</i> set to the user's away message if they are away</li> <li><i>is_oper:</i> true if the user is an IRCop</li> <li><i>idle_time:</i> amount of time the user has been idle</li> <li><i>channels:</i> array containing the channels the user has joined</li> </ul>
</li>
<li>
nick: User to request WHOIS information about
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li><strong>irc.message</strong></li>
<li>
<a href="../modules/irc.misc.html">irc.misc</a>
</li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.message</code></h1>
<p>This module contains parsing functions for IRC server messages.</p>
<br/>
<br/>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<!-- Module list -->
<h1>Modules</h1>
<ul>
<li>
<a href="../modules/callbacks.html">callbacks</a>
</li>
<li>
<a href="../modules/irc.html">irc</a>
</li>
<li>
<a href="../modules/irc.channel.html">irc.channel</a>
</li>
<li>
<a href="../modules/irc.constants.html">irc.constants</a>
</li>
<li>
<a href="../modules/irc.ctcp.html">irc.ctcp</a>
</li>
<li>
<a href="../modules/irc.dcc.html">irc.dcc</a>
</li>
<li>
<a href="../modules/irc.debug.html">irc.debug</a>
</li>
<li>
<a href="../modules/irc.message.html">irc.message</a>
</li>
<li><strong>irc.misc</strong></li>
</ul>
<!-- File list -->
</div><!-- id="navigation" -->
<div id="content">
<h1>Module <code>irc.misc</code></h1>
<p>This module contains various useful functions which didn't fit in any of the other modules.</p>
<br/>
<br/>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>