irc/doc/luairc/modules/irc.channel.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>&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>