forked from minetest-mods/irc
946 lines
13 KiB
HTML
946 lines
13 KiB
HTML
<!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> (self, name)</td>
|
|
<td class="summary">Ban a user from a channel.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#contains">contains</a> (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> (self, name)</td>
|
|
<td class="summary">Remove ops from a user.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#devoice">devoice</a> (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> (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> (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> (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> (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> (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> (chan)</td>
|
|
<td class="summary">Creates a new Channel object.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#op">op</a> (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> (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> (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> (self, key)</td>
|
|
<td class="summary">Set a channel password.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#set_limit">set_limit</a> (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> (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> (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> (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> (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> (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> (self, name)</td>
|
|
<td class="summary">Remove a ban on a user.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#users">users</a> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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> (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>
|