mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
Update autogenerated docs (adding a script to do this now)
This commit is contained in:
parent
d8e5202e5b
commit
506ae011a4
@ -23,10 +23,13 @@ Here be dragons.</tt></p>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
|
||||
<a href="socket.html">socket</a><br>
|
||||
</td><td width="25%" valign=top><a href="ssl.html">ssl</a><br>
|
||||
<a href="threading.html">threading</a><br>
|
||||
</td><td width="25%" valign=top><a href="time.html">time</a><br>
|
||||
<a href="logging.html">logging</a><br>
|
||||
<a href="os.html">os</a><br>
|
||||
</td><td width="25%" valign=top><a href="socket.html">socket</a><br>
|
||||
<a href="ssl.html">ssl</a><br>
|
||||
<a href="sys.html">sys</a><br>
|
||||
</td><td width="25%" valign=top><a href="threading.html">threading</a><br>
|
||||
<a href="time.html">time</a><br>
|
||||
<a href="utils.html">utils</a><br>
|
||||
</td><td width="25%" valign=top><a href="world.html">world</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
@ -80,11 +83,12 @@ Here be dragons.</tt></p>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="FakeIRC-connect"><strong>connect</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="FakeIRC-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Runs the connect loop for the IRC <a href="builtins.html#object">object</a>. This is usually called by<br>
|
||||
__init__ in a separate thread to allow multiple concurrent connections.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-run"><strong>run</strong></a>(self, data)</dt><dd><tt>Queues a message to the fake IRC server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-send"><strong>send</strong></a>(self, data)</dt></dl>
|
||||
<dl><dt><a name="FakeIRC-send"><strong>send</strong></a>(self, data)</dt><dd><tt>Sends raw text to the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-takeCommands"><strong>takeCommands</strong></a>(self, msgs)</dt><dd><tt>Returns a list of commands parsed from the output of <a href="#FakeIRC-takeMsgs">takeMsgs</a>().</tt></dd></dl>
|
||||
|
||||
@ -100,21 +104,32 @@ Methods inherited from <a href="classes.html#Irc">Irc</a>:<br>
|
||||
(a string), the name of the protocol module to use for this connection,<br>
|
||||
and a configuration <a href="builtins.html#object">object</a>.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="FakeIRC-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-callCommand"><strong>callCommand</strong></a>(self, source, text)</dt><dd><tt>Calls a PyLink bot command. source is the caller's UID, and text is the<br>
|
||||
full, unparsed text of the message.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-callHooks"><strong>callHooks</strong></a>(self, hook_args)</dt><dd><tt>Calls a hook function with the given hook args.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Closes the IRC connection.</tt></dd></dl>
|
||||
<dl><dt><a name="FakeIRC-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Handle disconnects from the remote server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-getServer"><strong>getServer</strong></a>(self, numeric)</dt><dd><tt>Finds the SID of the server a user is on.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-initVars"><strong>initVars</strong></a>(self)</dt><dd><tt>(Re)sets an IRC <a href="builtins.html#object">object</a> to its default state. This should be called when<br>
|
||||
an IRC <a href="builtins.html#object">object</a> is first created, and on every reconnection to a network.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-isInternalClient"><strong>isInternalClient</strong></a>(self, numeric)</dt><dd><tt>Checks whether the given numeric is a PyLink Client,<br>
|
||||
returning the SID of the server it's on if so.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-isInternalServer"><strong>isInternalServer</strong></a>(self, sid)</dt><dd><tt>Returns whether the given SID is an internal PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-logSetup"><strong>logSetup</strong></a>(self)</dt><dd><tt>Initializes any channel loggers defined for the current network.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-msg"><strong>msg</strong></a>(self, target, text, notice=False, source=None)</dt><dd><tt>Handy function to send messages/notices to clients. Source<br>
|
||||
is optional, and defaults to the main PyLink client if not specified.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-nickToUid"><strong>nickToUid</strong></a>(self, nick)</dt><dd><tt>Looks up the UID of a user with the given nick, if one is present.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-reply"><strong>reply</strong></a>(self, text, notice=False, source=None)</dt><dd><tt>Replies to the last caller in the right context (channel or PM).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeIRC-runline"><strong>runline</strong></a>(self, line)</dt><dd><tt>Sends a command to the protocol module.</tt></dd></dl>
|
||||
@ -151,7 +166,7 @@ Methods defined here:<br>
|
||||
|
||||
<dl><dt><a name="FakeProto-handle_events"><strong>handle_events</strong></a>(self, data)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FakeProto-joinClient"><strong>joinClient</strong></a>(self, client, channel)</dt></dl>
|
||||
<dl><dt><a name="FakeProto-join"><strong>join</strong></a>(self, client, channel)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FakeProto-spawnClient"><strong>spawnClient</strong></a>(self, nick, *args, **kwargs)</dt></dl>
|
||||
|
||||
@ -161,7 +176,7 @@ Data and other attributes defined here:<br>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">Protocol</a>:<br>
|
||||
<dl><dt><a name="FakeProto-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt># TODO: Future state-keeping things will go here</tt></dd></dl>
|
||||
<dl><dt><a name="FakeProto-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="FakeProto-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
@ -193,7 +208,7 @@ Data descriptors inherited from <a href="classes.html#Protocol">Protocol</a>:<br
|
||||
(a string), the name of the protocol module to use for this connection,<br>
|
||||
and a configuration <a href="builtins.html#object">object</a>.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="Irc-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-callCommand"><strong>callCommand</strong></a>(self, source, text)</dt><dd><tt>Calls a PyLink bot command. source is the caller's UID, and text is the<br>
|
||||
full, unparsed text of the message.</tt></dd></dl>
|
||||
@ -203,14 +218,25 @@ full, unparsed text of the message.</tt></dd></dl>
|
||||
<dl><dt><a name="Irc-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Runs the connect loop for the IRC <a href="builtins.html#object">object</a>. This is usually called by<br>
|
||||
__init__ in a separate thread to allow multiple concurrent connections.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Closes the IRC connection.</tt></dd></dl>
|
||||
<dl><dt><a name="Irc-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Handle disconnects from the remote server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-getServer"><strong>getServer</strong></a>(self, numeric)</dt><dd><tt>Finds the SID of the server a user is on.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-initVars"><strong>initVars</strong></a>(self)</dt><dd><tt>(Re)sets an IRC <a href="builtins.html#object">object</a> to its default state. This should be called when<br>
|
||||
an IRC <a href="builtins.html#object">object</a> is first created, and on every reconnection to a network.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-isInternalClient"><strong>isInternalClient</strong></a>(self, numeric)</dt><dd><tt>Checks whether the given numeric is a PyLink Client,<br>
|
||||
returning the SID of the server it's on if so.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-isInternalServer"><strong>isInternalServer</strong></a>(self, sid)</dt><dd><tt>Returns whether the given SID is an internal PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-logSetup"><strong>logSetup</strong></a>(self)</dt><dd><tt>Initializes any channel loggers defined for the current network.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-msg"><strong>msg</strong></a>(self, target, text, notice=False, source=None)</dt><dd><tt>Handy function to send messages/notices to clients. Source<br>
|
||||
is optional, and defaults to the main PyLink client if not specified.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-nickToUid"><strong>nickToUid</strong></a>(self, nick)</dt><dd><tt>Looks up the UID of a user with the given nick, if one is present.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-reply"><strong>reply</strong></a>(self, text, notice=False, source=None)</dt><dd><tt>Replies to the last caller in the right context (channel or PM).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Irc-run"><strong>run</strong></a>(self)</dt><dd><tt>Main IRC loop which listens for messages.</tt></dd></dl>
|
||||
@ -241,9 +267,9 @@ Data descriptors defined here:<br>
|
||||
<td colspan=2><tt>PyLink IRC channel class.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="IrcChannel-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="IrcChannel-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="IrcChannel-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="IrcChannel-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="IrcChannel-deepcopy"><strong>deepcopy</strong></a>(self)</dt><dd><tt>Returns a deep copy of the channel <a href="builtins.html#object">object</a>.</tt></dd></dl>
|
||||
|
||||
@ -272,9 +298,9 @@ name: The name of the server.<br>
|
||||
internal: Whether the server is an internal PyLink PseudoServer.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="IrcServer-__init__"><strong>__init__</strong></a>(self, uplink, name, internal=False, desc='(None given)')</dt></dl>
|
||||
<dl><dt><a name="IrcServer-__init__"><strong>__init__</strong></a>(self, uplink, name, internal=False, desc='(None given)')</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="IrcServer-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="IrcServer-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors defined here:<br>
|
||||
@ -294,9 +320,9 @@ Data descriptors defined here:<br>
|
||||
<td colspan=2><tt>PyLink IRC user class.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="IrcUser-__init__"><strong>__init__</strong></a>(self, nick, ts, uid, ident='null', host='null', realname='PyLink dummy client', realhost='null', ip='0.0.0.0', manipulatable=False)</dt></dl>
|
||||
<dl><dt><a name="IrcUser-__init__"><strong>__init__</strong></a>(self, nick, ts, uid, ident='null', host='null', realname='PyLink dummy client', realhost='null', ip='0.0.0.0', manipulatable=False)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="IrcUser-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
<dl><dt><a name="IrcUser-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors defined here:<br>
|
||||
@ -312,9 +338,11 @@ Data descriptors defined here:<br>
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="Protocol">class <strong>Protocol</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base <a href="#Protocol">Protocol</a> module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="Protocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt># TODO: Future state-keeping things will go here</tt></dd></dl>
|
||||
<dl><dt><a name="Protocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Protocol-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
@ -338,7 +366,9 @@ Data descriptors defined here:<br>
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ProtocolError">class <strong>ProtocolError</strong></a>(<a href="builtins.html#Exception">builtins.Exception</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Common base class for all non-exit exceptions.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="classes.html#ProtocolError">ProtocolError</a></dd>
|
||||
<dd><a href="builtins.html#Exception">builtins.Exception</a></dd>
|
||||
@ -362,7 +392,7 @@ Methods inherited from <a href="builtins.html#BaseException">builtins.BaseExcept
|
||||
|
||||
<dl><dt><a name="ProtocolError-__getattribute__"><strong>__getattribute__</strong></a>(self, name, /)</dt><dd><tt>Return getattr(self, name).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="ProtocolError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
||||
<dl><dt><a name="ProtocolError-__reduce__"><strong>__reduce__</strong></a>(...)</dt><dd><tt>helper for pickle</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="ProtocolError-__repr__"><strong>__repr__</strong></a>(self, /)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
@ -398,5 +428,12 @@ Data descriptors inherited from <a href="builtins.html#BaseException">builtins.B
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>log</strong> = <logging.RootLogger object></td></tr></table>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7f07198fc840>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>curdir</strong> = '/home/gl/pylink'<br>
|
||||
<strong>files</strong> = None<br>
|
||||
<strong>log</strong> = <logging.RootLogger object><br>
|
||||
<strong>logdir</strong> = '/home/gl/pylink/log'<br>
|
||||
<strong>logformatter</strong> = <logging.Formatter object><br>
|
||||
<strong>stdout_level</strong> = 'CRITICAL'</td></tr></table>
|
||||
</body></html>
|
@ -47,8 +47,8 @@ configurations from arbitrary files.</tt></p>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'loglevel': 'CRITICAL', 'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'servers': defaultdict(<function <lambda> at 0x7f9f56c70ea0>, {})}<br>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7ff39bba5598>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>fname</strong> = None<br>
|
||||
<strong>testconf</strong> = {'bot': {'loglevel': 'CRITICAL', 'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'servers': defaultdict(<function <lambda> at 0x7f9f56c70ea0>, {})}</td></tr></table>
|
||||
<strong>testconf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7ff39bba5598>, {})}</td></tr></table>
|
||||
</body></html>
|
62
docs/technical/autogen/coreplugin.html
Normal file
62
docs/technical/autogen/coreplugin.html
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module coreplugin</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>coreplugin</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/gl/pylink/coreplugin.py">/home/gl/pylink/coreplugin.py</a></font></td></tr></table>
|
||||
<p><tt>coreplugin.py - Implements core PyLink functions as a plugin.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="gc.html">gc</a><br>
|
||||
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
||||
</td><td width="25%" valign=top><a href="utils.html">utils</a><br>
|
||||
</td><td width="25%" valign=top><a href="world.html">world</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-handle_commands"><strong>handle_commands</strong></a>(irc, source, command, args)</dt><dd><tt>Handle commands sent to the PyLink client (PRIVMSG).</tt></dd></dl>
|
||||
<dl><dt><a name="-handle_kick"><strong>handle_kick</strong></a>(irc, source, command, args)</dt><dd><tt>Handle KICKs to the main PyLink client, rejoining channels as needed.</tt></dd></dl>
|
||||
<dl><dt><a name="-handle_kill"><strong>handle_kill</strong></a>(irc, source, command, args)</dt><dd><tt>Handle KILLs to the main PyLink client, respawning it as needed.</tt></dd></dl>
|
||||
<dl><dt><a name="-handle_mode"><strong>handle_mode</strong></a>(irc, source, command, args)</dt><dd><tt>Protect against forced deoper attempts.</tt></dd></dl>
|
||||
<dl><dt><a name="-handle_operup"><strong>handle_operup</strong></a>(irc, source, command, args)</dt><dd><tt>Logs successful oper-ups on networks.</tt></dd></dl>
|
||||
<dl><dt><a name="-handle_services_login"><strong>handle_services_login</strong></a>(irc, source, command, args)</dt><dd><tt>Sets services login status for users.</tt></dd></dl>
|
||||
<dl><dt><a name="-handle_whois"><strong>handle_whois</strong></a>(irc, source, command, args)</dt><dd><tt>Handle WHOIS queries, for IRCds that send them across servers (charybdis, UnrealIRCd; NOT InspIRCd).</tt></dd></dl>
|
||||
<dl><dt><a name="-identify"><strong>identify</strong></a>(irc, source, args)</dt><dd><tt><username> <password><br>
|
||||
<br>
|
||||
Logs in to PyLink using the configured administrator account.</tt></dd></dl>
|
||||
<dl><dt><a name="-load"><strong>load</strong></a>(irc, source, args)</dt><dd><tt><plugin name>.<br>
|
||||
<br>
|
||||
Loads a plugin from the plugin folder.</tt></dd></dl>
|
||||
<dl><dt><a name="-main"><strong>main</strong></a>(irc=None)</dt></dl>
|
||||
<dl><dt><a name="-reload"><strong>reload</strong></a>(irc, source, args)</dt><dd><tt><plugin name>.<br>
|
||||
<br>
|
||||
Loads a plugin from the plugin folder.</tt></dd></dl>
|
||||
<dl><dt><a name="-shutdown"><strong>shutdown</strong></a>(irc, source, args)</dt><dd><tt>takes no arguments.<br>
|
||||
<br>
|
||||
Exits PyLink by disconnecting all networks.</tt></dd></dl>
|
||||
<dl><dt><a name="-unload"><strong>unload</strong></a>(irc, source, args)</dt><dd><tt><plugin name>.<br>
|
||||
<br>
|
||||
Unloads a currently loaded plugin.</tt></dd></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>log</strong> = <logging.RootLogger object></td></tr></table>
|
||||
</body></html>
|
@ -18,15 +18,16 @@
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
|
||||
<a href="logging.html">logging</a><br>
|
||||
<a href="os.html">os</a><br>
|
||||
<a href="re.html">re</a><br>
|
||||
</td><td width="25%" valign=top><a href="socket.html">socket</a><br>
|
||||
</td><td width="25%" valign=top><a href="re.html">re</a><br>
|
||||
<a href="socket.html">socket</a><br>
|
||||
<a href="ssl.html">ssl</a><br>
|
||||
<a href="sys.html">sys</a><br>
|
||||
</td><td width="25%" valign=top><a href="threading.html">threading</a><br>
|
||||
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
||||
<a href="threading.html">threading</a><br>
|
||||
<a href="time.html">time</a><br>
|
||||
<a href="utils.html">utils</a><br>
|
||||
</td><td width="25%" valign=top><a href="world.html">world</a><br>
|
||||
</td><td width="25%" valign=top><a href="utils.html">utils</a><br>
|
||||
<a href="world.html">world</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
@ -48,7 +49,9 @@
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><strong>Class</strong> = <a name="Class">class InspIRCdProtocol</a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base Protocol module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="inspircd.html#InspIRCdProtocol">InspIRCdProtocol</a></dd>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a></dd>
|
||||
@ -57,15 +60,18 @@
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-awayClient"><strong>awayClient</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_capab"><strong>handle_capab</strong></a>(self, source, command, args)</dt><dd><tt>Handles the CAPAB command, used for capability negotiation with our<br>
|
||||
uplink.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_encap"><strong>handle_encap</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming encapsulated commands (ENCAP). Hook arguments<br>
|
||||
returned by this should have a parse_as field, that sets the correct<br>
|
||||
hook name for the message.<br>
|
||||
@ -74,12 +80,6 @@ For InspIRCd, the only ENCAP command we handl
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_endburst"><strong>handle_endburst</strong></a>(self, numeric, command, args)</dt><dd><tt>ENDBURST handler; sends a hook with empty contents.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for the InspIRCd protocol.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere in this module, but also handles commands sent in the<br>
|
||||
initial server linking phase.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_fhost"><strong>handle_fhost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles FHOST, used for denoting hostname changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_fident"><strong>handle_fident</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles FIDENT, used for denoting ident changes.</tt></dd></dl>
|
||||
@ -96,6 +96,9 @@ initial server linking phase.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_metadata"><strong>handle_metadata</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the METADATA command, used by servers to send metadata (services<br>
|
||||
login name, certfp data, etc.) for clients.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_mode"><strong>handle_mode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming user mode changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_opertype"><strong>handle_opertype</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming OPERTYPE, which is used to denote an oper up.<br>
|
||||
@ -120,36 +123,31 @@ servers.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming UID commands (user introduction).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-inviteClient"><strong>inviteClient</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-joinClient"><strong>joinClient</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-join"><strong>join</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-killClient"><strong>killClient</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-kill"><strong>kill</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-killServer"><strong>killServer</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-knockClient"><strong>knockClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-mode"><strong>mode</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-modeClient"><strong>modeClient</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client. <modes> should be<br>
|
||||
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-modeServer"><strong>modeServer</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink server. <list of modes> should be<br>
|
||||
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-numericServer"><strong>numericServer</strong></a>(self, source, numeric, target, text)</dt></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-pingServer"><strong>pingServer</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-ping"><strong>ping</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
automatically by the Irc() internals; plugins shouldn't have to use this.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-sjoinServer"><strong>sjoinServer</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-sjoin"><strong>sjoin</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<br>
|
||||
The sender should always be a Server ID (SID). TS is optional, and defaults<br>
|
||||
to the one we've stored in the channel state if not given.<br>
|
||||
<users> is a list of (prefix mode, UID) pairs:<br>
|
||||
<br>
|
||||
Example uses:<br>
|
||||
<a href="#Class-sjoinServer">sjoinServer</a>('100', '#test', [('', '100AAABBC'), ('qo', 100AAABBB'), ('h', '100AAADDD')])<br>
|
||||
<a href="#Class-sjoinServer">sjoinServer</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
||||
<a href="#Class-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('qo', 100AAABBB'), ('h', '100AAADDD')])<br>
|
||||
<a href="#Class-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-spawnClient"><strong>spawnClient</strong></a>(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, manipulatable=False)</dt><dd><tt>Spawns a client with nick <nick> on the given IRC connection.<br>
|
||||
<br>
|
||||
@ -166,16 +164,26 @@ will be delayed by the amount given. This&nbs
|
||||
pseudoserver bursts from triggering IRCd join-flood preventions,<br>
|
||||
and prevent connections from filling up the snomasks too much.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-squitServer"><strong>squitServer</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-topicServer"><strong>topicServer</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a topic change from a PyLink server. This is usually used on burst.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-topicBurst"><strong>topicBurst</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a topic change from a PyLink server. This is usually used on burst.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-updateClient"><strong>updateClient</strong></a>(self, numeric, field, text)</dt><dd><tt>Updates the ident, host, or realname of a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident, host, or realname of any connected client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
@ -197,24 +205,22 @@ Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6B
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TOPIC changes from clients. For topic bursts,<br>
|
||||
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-kickClient"><strong>kickClient</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends a kick from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-kickServer"><strong>kickServer</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends a kick from a PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-messageClient"><strong>messageClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-nickClient"><strong>nickClient</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-noticeClient"><strong>noticeClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#Class-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-partClient"><strong>partClient</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-quitClient"><strong>quitClient</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-topicClient"><strong>topicClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
@ -240,7 +246,9 @@ Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="InspIRCdProtocol">class <strong>InspIRCdProtocol</strong></a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base Protocol module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="inspircd.html#InspIRCdProtocol">InspIRCdProtocol</a></dd>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a></dd>
|
||||
@ -249,15 +257,18 @@ Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-awayClient"><strong>awayClient</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_capab"><strong>handle_capab</strong></a>(self, source, command, args)</dt><dd><tt>Handles the CAPAB command, used for capability negotiation with our<br>
|
||||
uplink.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_encap"><strong>handle_encap</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming encapsulated commands (ENCAP). Hook arguments<br>
|
||||
returned by this should have a parse_as field, that sets the correct<br>
|
||||
hook name for the message.<br>
|
||||
@ -266,12 +277,6 @@ For InspIRCd, the only ENCAP command we handl
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_endburst"><strong>handle_endburst</strong></a>(self, numeric, command, args)</dt><dd><tt>ENDBURST handler; sends a hook with empty contents.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for the InspIRCd protocol.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere in this module, but also handles commands sent in the<br>
|
||||
initial server linking phase.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_fhost"><strong>handle_fhost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles FHOST, used for denoting hostname changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_fident"><strong>handle_fident</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles FIDENT, used for denoting ident changes.</tt></dd></dl>
|
||||
@ -288,6 +293,9 @@ initial server linking phase.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_metadata"><strong>handle_metadata</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the METADATA command, used by servers to send metadata (services<br>
|
||||
login name, certfp data, etc.) for clients.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_mode"><strong>handle_mode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming user mode changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_opertype"><strong>handle_opertype</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming OPERTYPE, which is used to denote an oper up.<br>
|
||||
@ -312,36 +320,31 @@ servers.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming UID commands (user introduction).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-inviteClient"><strong>inviteClient</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-joinClient"><strong>joinClient</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-join"><strong>join</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-killClient"><strong>killClient</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-kill"><strong>kill</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-killServer"><strong>killServer</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-knockClient"><strong>knockClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-mode"><strong>mode</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-modeClient"><strong>modeClient</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client. <modes> should be<br>
|
||||
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-modeServer"><strong>modeServer</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink server. <list of modes> should be<br>
|
||||
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-numericServer"><strong>numericServer</strong></a>(self, source, numeric, target, text)</dt></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-pingServer"><strong>pingServer</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-ping"><strong>ping</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
automatically by the Irc() internals; plugins shouldn't have to use this.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-sjoinServer"><strong>sjoinServer</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-sjoin"><strong>sjoin</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<br>
|
||||
The sender should always be a Server ID (SID). TS is optional, and defaults<br>
|
||||
to the one we've stored in the channel state if not given.<br>
|
||||
<users> is a list of (prefix mode, UID) pairs:<br>
|
||||
<br>
|
||||
Example uses:<br>
|
||||
<a href="#InspIRCdProtocol-sjoinServer">sjoinServer</a>('100', '#test', [('', '100AAABBC'), ('qo', 100AAABBB'), ('h', '100AAADDD')])<br>
|
||||
<a href="#InspIRCdProtocol-sjoinServer">sjoinServer</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
||||
<a href="#InspIRCdProtocol-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('qo', 100AAABBB'), ('h', '100AAADDD')])<br>
|
||||
<a href="#InspIRCdProtocol-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-spawnClient"><strong>spawnClient</strong></a>(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, manipulatable=False)</dt><dd><tt>Spawns a client with nick <nick> on the given IRC connection.<br>
|
||||
<br>
|
||||
@ -358,16 +361,26 @@ will be delayed by the amount given. This&nbs
|
||||
pseudoserver bursts from triggering IRCd join-flood preventions,<br>
|
||||
and prevent connections from filling up the snomasks too much.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-squitServer"><strong>squitServer</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-topicServer"><strong>topicServer</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a topic change from a PyLink server. This is usually used on burst.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-topicBurst"><strong>topicBurst</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a topic change from a PyLink server. This is usually used on burst.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-updateClient"><strong>updateClient</strong></a>(self, numeric, field, text)</dt><dd><tt>Updates the ident, host, or realname of a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident, host, or realname of any connected client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
@ -389,24 +402,22 @@ Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6B
|
||||
<dl><dt><a name="InspIRCdProtocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TOPIC changes from clients. For topic bursts,<br>
|
||||
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-kickClient"><strong>kickClient</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends a kick from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-kickServer"><strong>kickServer</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends a kick from a PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-messageClient"><strong>messageClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-nickClient"><strong>nickClient</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-noticeClient"><strong>noticeClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#InspIRCdProtocol-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-partClient"><strong>partClient</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-quitClient"><strong>quitClient</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="InspIRCdProtocol-topicClient"><strong>topicClient</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
<dl><dt><a name="InspIRCdProtocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
@ -433,6 +444,12 @@ Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>curdir</strong> = 'protocols'<br>
|
||||
<strong>log</strong> = <logging.RootLogger object></td></tr></table>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7f67e167a378>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>curdir</strong> = '/home/gl/pylink'<br>
|
||||
<strong>files</strong> = None<br>
|
||||
<strong>log</strong> = <logging.RootLogger object><br>
|
||||
<strong>logdir</strong> = '/home/gl/pylink/log'<br>
|
||||
<strong>logformatter</strong> = <logging.Formatter object><br>
|
||||
<strong>stdout_level</strong> = 'CRITICAL'</td></tr></table>
|
||||
</body></html>
|
@ -26,17 +26,140 @@ access the global logger object by importing
|
||||
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
||||
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="logging.html#Handler">logging.Handler</a>(<a href="logging.html#Filterer">logging.Filterer</a>)
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="log.html#PyLinkChannelLogger">PyLinkChannelLogger</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="PyLinkChannelLogger">class <strong>PyLinkChannelLogger</strong></a>(<a href="logging.html#Handler">logging.Handler</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Log handler to log to channels in PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="log.html#PyLinkChannelLogger">PyLinkChannelLogger</a></dd>
|
||||
<dd><a href="logging.html#Handler">logging.Handler</a></dd>
|
||||
<dd><a href="logging.html#Filterer">logging.Filterer</a></dd>
|
||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="PyLinkChannelLogger-__init__"><strong>__init__</strong></a>(self, irc, channel, level=None)</dt><dd><tt>Initializes the instance - basically setting the formatter to None<br>
|
||||
and the filter list to empty.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-emit"><strong>emit</strong></a>(self, record)</dt><dd><tt>Logs a record to the configured channels for the network given.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="logging.html#Handler">logging.Handler</a>:<br>
|
||||
<dl><dt><a name="PyLinkChannelLogger-acquire"><strong>acquire</strong></a>(self)</dt><dd><tt>Acquire the I/O thread lock.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-close"><strong>close</strong></a>(self)</dt><dd><tt>Tidy up any resources used by the handler.<br>
|
||||
<br>
|
||||
This version removes the handler from an internal map of handlers,<br>
|
||||
_handlers, which is used for handler lookup by name. Subclasses<br>
|
||||
should ensure that this gets called from overridden <a href="#PyLinkChannelLogger-close">close</a>()<br>
|
||||
methods.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-createLock"><strong>createLock</strong></a>(self)</dt><dd><tt>Acquire a thread lock for serializing access to the underlying I/O.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-flush"><strong>flush</strong></a>(self)</dt><dd><tt>Ensure all logging output has been flushed.<br>
|
||||
<br>
|
||||
This version does nothing and is intended to be implemented by<br>
|
||||
subclasses.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-format"><strong>format</strong></a>(self, record)</dt><dd><tt>Format the specified record.<br>
|
||||
<br>
|
||||
If a formatter is set, use it. Otherwise, use the default formatter<br>
|
||||
for the module.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-get_name"><strong>get_name</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-handle"><strong>handle</strong></a>(self, record)</dt><dd><tt>Conditionally emit the specified logging record.<br>
|
||||
<br>
|
||||
Emission depends on filters which may have been added to the handler.<br>
|
||||
Wrap the actual emission of the record with acquisition/release of<br>
|
||||
the I/O thread lock. Returns whether the filter passed the record for<br>
|
||||
emission.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-handleError"><strong>handleError</strong></a>(self, record)</dt><dd><tt>Handle errors which occur during an <a href="#PyLinkChannelLogger-emit">emit</a>() call.<br>
|
||||
<br>
|
||||
This method should be called from handlers when an exception is<br>
|
||||
encountered during an <a href="#PyLinkChannelLogger-emit">emit</a>() call. If raiseExceptions is false,<br>
|
||||
exceptions get silently ignored. This is what is mostly wanted<br>
|
||||
for a logging system - most users will not care about errors in<br>
|
||||
the logging system, they are more interested in application errors.<br>
|
||||
You could, however, replace this with a custom handler if you wish.<br>
|
||||
The record which was being processed is passed in to this method.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-release"><strong>release</strong></a>(self)</dt><dd><tt>Release the I/O thread lock.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-setFormatter"><strong>setFormatter</strong></a>(self, fmt)</dt><dd><tt>Set the formatter for this handler.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-setLevel"><strong>setLevel</strong></a>(self, level)</dt><dd><tt>Set the logging level of this handler. level must be an int or a str.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-set_name"><strong>set_name</strong></a>(self, name)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="logging.html#Handler">logging.Handler</a>:<br>
|
||||
<dl><dt><strong>name</strong></dt>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods inherited from <a href="logging.html#Filterer">logging.Filterer</a>:<br>
|
||||
<dl><dt><a name="PyLinkChannelLogger-addFilter"><strong>addFilter</strong></a>(self, filter)</dt><dd><tt>Add the specified filter to this handler.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-filter"><strong>filter</strong></a>(self, record)</dt><dd><tt>Determine if a record is loggable by consulting all the filters.<br>
|
||||
<br>
|
||||
The default is to allow the record to be logged; any filter can veto<br>
|
||||
this and the record is then dropped. Returns a zero value if a record<br>
|
||||
is to be dropped, else non-zero.<br>
|
||||
<br>
|
||||
.. versionchanged: 3.2<br>
|
||||
<br>
|
||||
Allow filters to be just callables.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PyLinkChannelLogger-removeFilter"><strong>removeFilter</strong></a>(self, filter)</dt><dd><tt>Remove the specified filter from this handler.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="logging.html#Filterer">logging.Filterer</a>:<br>
|
||||
<dl><dt><strong>__dict__</strong></dt>
|
||||
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
||||
</dl>
|
||||
<dl><dt><strong>__weakref__</strong></dt>
|
||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
||||
</dl>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-makeFileLogger"><strong>makeFileLogger</strong></a>(filename, level=None)</dt><dd><tt>Initializes a file logging target with the given filename and level.</tt></dd></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'loglevel': 'CRITICAL', 'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'servers': defaultdict(<function <lambda> at 0x7f9f56d40bf8>, {})}<br>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7f18ebfaea60>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>curdir</strong> = '/home/gl/pylink'<br>
|
||||
<strong>level</strong> = 50<br>
|
||||
<strong>files</strong> = None<br>
|
||||
<strong>log</strong> = <logging.RootLogger object><br>
|
||||
<strong>logdir</strong> = '/home/gl/pylink/log'<br>
|
||||
<strong>logfile</strong> = <logging.FileHandler object><br>
|
||||
<strong>logformat</strong> = <logging.Formatter object></td></tr></table>
|
||||
<strong>logformatter</strong> = <logging.Formatter object><br>
|
||||
<strong>stdout_level</strong> = 'CRITICAL'</td></tr></table>
|
||||
</body></html>
|
441
docs/technical/autogen/ts6.html
Normal file
441
docs/technical/autogen/ts6.html
Normal file
@ -0,0 +1,441 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module ts6</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>ts6</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/gl/pylink/protocols/ts6.py">/home/gl/pylink/protocols/ts6.py</a></font></td></tr></table>
|
||||
<p><tt>ts6.py: PyLink protocol module for TS6-based IRCds (charybdis, elemental-ircd).</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
|
||||
<a href="logging.html">logging</a><br>
|
||||
<a href="os.html">os</a><br>
|
||||
</td><td width="25%" valign=top><a href="re.html">re</a><br>
|
||||
<a href="socket.html">socket</a><br>
|
||||
<a href="ssl.html">ssl</a><br>
|
||||
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
||||
<a href="threading.html">threading</a><br>
|
||||
<a href="time.html">time</a><br>
|
||||
</td><td width="25%" valign=top><a href="utils.html">utils</a><br>
|
||||
<a href="world.html">world</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>(<a href="classes.html#Protocol">classes.Protocol</a>)
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="ts6.html#TS6Protocol">TS6Protocol</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><strong>Class</strong> = <a name="Class">class TS6Protocol</a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base Protocol module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="ts6.html#TS6Protocol">TS6Protocol</a></dd>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a></dd>
|
||||
<dd><a href="classes.html#Protocol">classes.Protocol</a></dd>
|
||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="TS6Protocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_472"><strong>handle_472</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the incoming 472 numeric.<br>
|
||||
<br>
|
||||
472 is sent to us when one of our clients tries to set a mode the uplink<br>
|
||||
server doesn't support. In this case, we'll raise a warning to alert<br>
|
||||
the administrator that certain extensions should be loaded for the best<br>
|
||||
compatibility.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_bmask"><strong>handle_bmask</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming BMASK commands (ban propagation on burst).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_capab"><strong>handle_capab</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the CAPAB command, used for TS6 capability negotiation.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_chghost"><strong>handle_chghost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming CHGHOST commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_encap"><strong>handle_encap</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the ENCAP command - encapsulated TS6 commands with a variety of<br>
|
||||
subcommands used for different purposes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_euid"><strong>handle_euid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming EUID commands (user introduction).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_join"><strong>handle_join</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming channel JOINs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_mode"><strong>handle_mode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming user mode changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_pass"><strong>handle_pass</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the PASS command, used to send the server's SID and negotiate<br>
|
||||
passwords on connect.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_ping"><strong>handle_ping</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PING commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PONG commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_server"><strong>handle_server</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles 1) incoming legacy (no SID) server introductions,<br>
|
||||
2) Sending server data in initial connection.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_sid"><strong>handle_sid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming server introductions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_sjoin"><strong>handle_sjoin</strong></a>(self, servernumeric, command, args)</dt><dd><tt>Handles incoming SJOIN commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_tb"><strong>handle_tb</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming topic burst (TB) commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_tmode"><strong>handle_tmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TMODE commands (channel mode change).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_whois"><strong>handle_whois</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming WHOIS commands.<br>
|
||||
<br>
|
||||
Note: The core of WHOIS handling is done by coreplugin.py<br>
|
||||
(IRCd-independent), and not here.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-join"><strong>join</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-kill"><strong>kill</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-mode"><strong>mode</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-ping"><strong>ping</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
automatically by the Irc() internals; plugins shouldn't have to use this.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-sjoin"><strong>sjoin</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<br>
|
||||
The sender should always be a Server ID (SID). TS is optional, and defaults<br>
|
||||
to the one we've stored in the channel state if not given.<br>
|
||||
<users> is a list of (prefix mode, UID) pairs:<br>
|
||||
<br>
|
||||
Example uses:<br>
|
||||
<a href="#Class-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])<br>
|
||||
<a href="#Class-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-spawnClient"><strong>spawnClient</strong></a>(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, manipulatable=False)</dt><dd><tt>Spawns a client with nick <nick> on the given IRC connection.<br>
|
||||
<br>
|
||||
Note: No nick collision / valid nickname checks are done here; it is<br>
|
||||
up to plugins to make sure they don't introduce anything invalid.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-topicBurst"><strong>topicBurst</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a topic change from a PyLink server. This is usually used on burst.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the hostname of any connected client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
||||
<dl><dt><a name="TS6Protocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming NICK changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_notice"><strong>handle_notice</strong></a> = handle_privmsg(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PART commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_privmsg"><strong>handle_privmsg</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUIT commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_save"><strong>handle_save</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SAVE messages, used to handle nick collisions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SQUITs (netsplits).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TOPIC changes from clients. For topic bursts,<br>
|
||||
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#Class-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-spawnServer"><strong>spawnServer</strong></a>(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)</dt><dd><tt>Spawns a server off a PyLink server. desc (server description)<br>
|
||||
defaults to the one in the config. uplink defaults to the main PyLink<br>
|
||||
server, and sid (the server ID) is automatically generated if not<br>
|
||||
given.<br>
|
||||
<br>
|
||||
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay<br>
|
||||
option will be ignored if given.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><a name="TS6Protocol-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-removeClient"><strong>removeClient</strong></a>(self, numeric)</dt><dd><tt>Internal function to remove a client from our internal state.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-updateTS"><strong>updateTS</strong></a>(self, channel, their_ts)</dt><dd><tt>Compares the current TS of the channel given with the new TS, resetting<br>
|
||||
all modes we have if the one given is older.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><strong>__dict__</strong></dt>
|
||||
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
||||
</dl>
|
||||
<dl><dt><strong>__weakref__</strong></dt>
|
||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
||||
</dl>
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="TS6Protocol">class <strong>TS6Protocol</strong></a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base Protocol module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="ts6.html#TS6Protocol">TS6Protocol</a></dd>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a></dd>
|
||||
<dd><a href="classes.html#Protocol">classes.Protocol</a></dd>
|
||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="TS6Protocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_472"><strong>handle_472</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the incoming 472 numeric.<br>
|
||||
<br>
|
||||
472 is sent to us when one of our clients tries to set a mode the uplink<br>
|
||||
server doesn't support. In this case, we'll raise a warning to alert<br>
|
||||
the administrator that certain extensions should be loaded for the best<br>
|
||||
compatibility.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_bmask"><strong>handle_bmask</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming BMASK commands (ban propagation on burst).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_capab"><strong>handle_capab</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the CAPAB command, used for TS6 capability negotiation.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_chghost"><strong>handle_chghost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming CHGHOST commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_encap"><strong>handle_encap</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the ENCAP command - encapsulated TS6 commands with a variety of<br>
|
||||
subcommands used for different purposes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_euid"><strong>handle_euid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming EUID commands (user introduction).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_join"><strong>handle_join</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming channel JOINs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_mode"><strong>handle_mode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming user mode changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_pass"><strong>handle_pass</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the PASS command, used to send the server's SID and negotiate<br>
|
||||
passwords on connect.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_ping"><strong>handle_ping</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PING commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PONG commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_server"><strong>handle_server</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles 1) incoming legacy (no SID) server introductions,<br>
|
||||
2) Sending server data in initial connection.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_sid"><strong>handle_sid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming server introductions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_sjoin"><strong>handle_sjoin</strong></a>(self, servernumeric, command, args)</dt><dd><tt>Handles incoming SJOIN commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_tb"><strong>handle_tb</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming topic burst (TB) commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_tmode"><strong>handle_tmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TMODE commands (channel mode change).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_whois"><strong>handle_whois</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming WHOIS commands.<br>
|
||||
<br>
|
||||
Note: The core of WHOIS handling is done by coreplugin.py<br>
|
||||
(IRCd-independent), and not here.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-join"><strong>join</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-kill"><strong>kill</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-mode"><strong>mode</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-ping"><strong>ping</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
automatically by the Irc() internals; plugins shouldn't have to use this.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-sjoin"><strong>sjoin</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<br>
|
||||
The sender should always be a Server ID (SID). TS is optional, and defaults<br>
|
||||
to the one we've stored in the channel state if not given.<br>
|
||||
<users> is a list of (prefix mode, UID) pairs:<br>
|
||||
<br>
|
||||
Example uses:<br>
|
||||
<a href="#TS6Protocol-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])<br>
|
||||
<a href="#TS6Protocol-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-spawnClient"><strong>spawnClient</strong></a>(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, manipulatable=False)</dt><dd><tt>Spawns a client with nick <nick> on the given IRC connection.<br>
|
||||
<br>
|
||||
Note: No nick collision / valid nickname checks are done here; it is<br>
|
||||
up to plugins to make sure they don't introduce anything invalid.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-topicBurst"><strong>topicBurst</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a topic change from a PyLink server. This is usually used on burst.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the hostname of any connected client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
||||
<dl><dt><a name="TS6Protocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming NICK changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_notice"><strong>handle_notice</strong></a> = handle_privmsg(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PART commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_privmsg"><strong>handle_privmsg</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUIT commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_save"><strong>handle_save</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SAVE messages, used to handle nick collisions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SQUITs (netsplits).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TOPIC changes from clients. For topic bursts,<br>
|
||||
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#TS6Protocol-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-spawnServer"><strong>spawnServer</strong></a>(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)</dt><dd><tt>Spawns a server off a PyLink server. desc (server description)<br>
|
||||
defaults to the one in the config. uplink defaults to the main PyLink<br>
|
||||
server, and sid (the server ID) is automatically generated if not<br>
|
||||
given.<br>
|
||||
<br>
|
||||
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay<br>
|
||||
option will be ignored if given.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><a name="TS6Protocol-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-removeClient"><strong>removeClient</strong></a>(self, numeric)</dt><dd><tt>Internal function to remove a client from our internal state.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6Protocol-updateTS"><strong>updateTS</strong></a>(self, channel, their_ts)</dt><dd><tt>Compares the current TS of the channel given with the new TS, resetting<br>
|
||||
all modes we have if the one given is older.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><strong>__dict__</strong></dt>
|
||||
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
||||
</dl>
|
||||
<dl><dt><strong>__weakref__</strong></dt>
|
||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
||||
</dl>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7fce06b832f0>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>curdir</strong> = '/home/gl/pylink'<br>
|
||||
<strong>files</strong> = None<br>
|
||||
<strong>log</strong> = <logging.RootLogger object><br>
|
||||
<strong>logdir</strong> = '/home/gl/pylink/log'<br>
|
||||
<strong>logformatter</strong> = <logging.Formatter object><br>
|
||||
<strong>stdout_level</strong> = 'CRITICAL'</td></tr></table>
|
||||
</body></html>
|
164
docs/technical/autogen/ts6_common.html
Normal file
164
docs/technical/autogen/ts6_common.html
Normal file
@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module ts6_common</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>ts6_common</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/gl/pylink/protocols/ts6_common.py">/home/gl/pylink/protocols/ts6_common.py</a></font></td></tr></table>
|
||||
<p><tt>ts6_common.py: Common base protocol class with functions shared by the UnrealIRCd, InspIRCd, and TS6 protocol modules.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
|
||||
<a href="logging.html">logging</a><br>
|
||||
<a href="os.html">os</a><br>
|
||||
</td><td width="25%" valign=top><a href="socket.html">socket</a><br>
|
||||
<a href="ssl.html">ssl</a><br>
|
||||
<a href="sys.html">sys</a><br>
|
||||
</td><td width="25%" valign=top><a href="threading.html">threading</a><br>
|
||||
<a href="time.html">time</a><br>
|
||||
<a href="utils.html">utils</a><br>
|
||||
</td><td width="25%" valign=top><a href="world.html">world</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="classes.html#Protocol">classes.Protocol</a>(<a href="builtins.html#object">builtins.object</a>)
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="ts6_common.html#TS6BaseProtocol">TS6BaseProtocol</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="TS6BaseProtocol">class <strong>TS6BaseProtocol</strong></a>(<a href="classes.html#Protocol">classes.Protocol</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base <a href="classes.html#Protocol">Protocol</a> module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">TS6BaseProtocol</a></dd>
|
||||
<dd><a href="classes.html#Protocol">classes.Protocol</a></dd>
|
||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="TS6BaseProtocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming NICK changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_notice"><strong>handle_notice</strong></a> = <a href="#TS6BaseProtocol-handle_privmsg">handle_privmsg</a>(self, source, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PART commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_privmsg"><strong>handle_privmsg</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUIT commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_save"><strong>handle_save</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SAVE messages, used to handle nick collisions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SQUITs (netsplits).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming TOPIC changes from clients. For topic bursts,<br>
|
||||
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#TS6BaseProtocol-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-spawnServer"><strong>spawnServer</strong></a>(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)</dt><dd><tt>Spawns a server off a PyLink server. desc (server description)<br>
|
||||
defaults to the one in the config. uplink defaults to the main PyLink<br>
|
||||
server, and sid (the server ID) is automatically generated if not<br>
|
||||
given.<br>
|
||||
<br>
|
||||
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay<br>
|
||||
option will be ignored if given.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><a name="TS6BaseProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-removeClient"><strong>removeClient</strong></a>(self, numeric)</dt><dd><tt>Internal function to remove a client from our internal state.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6BaseProtocol-updateTS"><strong>updateTS</strong></a>(self, channel, their_ts)</dt><dd><tt>Compares the current TS of the channel given with the new TS, resetting<br>
|
||||
all modes we have if the one given is older.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><strong>__dict__</strong></dt>
|
||||
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
||||
</dl>
|
||||
<dl><dt><strong>__weakref__</strong></dt>
|
||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
||||
</dl>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7fc131b711e0>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>curdir</strong> = '/home/gl/pylink'<br>
|
||||
<strong>files</strong> = None<br>
|
||||
<strong>log</strong> = <logging.RootLogger object><br>
|
||||
<strong>logdir</strong> = '/home/gl/pylink/log'<br>
|
||||
<strong>logformatter</strong> = <logging.Formatter object><br>
|
||||
<strong>stdout_level</strong> = 'CRITICAL'</td></tr></table>
|
||||
</body></html>
|
448
docs/technical/autogen/unreal.html
Normal file
448
docs/technical/autogen/unreal.html
Normal file
@ -0,0 +1,448 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module unreal</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>unreal</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/gl/pylink/protocols/unreal.py">/home/gl/pylink/protocols/unreal.py</a></font></td></tr></table>
|
||||
<p><tt>unreal.py: UnrealIRCd 4.0 protocol module for PyLink.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="codecs.html">codecs</a><br>
|
||||
<a href="hashlib.html">hashlib</a><br>
|
||||
<a href="logging.html">logging</a><br>
|
||||
</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
||||
<a href="re.html">re</a><br>
|
||||
<a href="socket.html">socket</a><br>
|
||||
</td><td width="25%" valign=top><a href="ssl.html">ssl</a><br>
|
||||
<a href="sys.html">sys</a><br>
|
||||
<a href="threading.html">threading</a><br>
|
||||
</td><td width="25%" valign=top><a href="time.html">time</a><br>
|
||||
<a href="utils.html">utils</a><br>
|
||||
<a href="world.html">world</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>(<a href="classes.html#Protocol">classes.Protocol</a>)
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="unreal.html#UnrealProtocol">UnrealProtocol</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><strong>Class</strong> = <a name="Class">class UnrealProtocol</a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base Protocol module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="unreal.html#UnrealProtocol">UnrealProtocol</a></dd>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a></dd>
|
||||
<dd><a href="classes.html#Protocol">classes.Protocol</a></dd>
|
||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="UnrealProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-checkCloakChange"><strong>checkCloakChange</strong></a>(self, uid, parsedmodes)</dt><dd><tt>Checks whether +x/-x was set in the mode query, and changes the<br>
|
||||
hostname of the user given to or from their cloaked host if True.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_chghost"><strong>handle_chghost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGHOST, used for denoting hostname changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_chgident"><strong>handle_chgident</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGIDENT, used for denoting ident changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_chgname"><strong>handle_chgname</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGNAME, used for denoting real name/gecos changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_eos"><strong>handle_eos</strong></a>(self, numeric, command, args)</dt><dd><tt>EOS is used to denote end of burst.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_join"><strong>handle_join</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the UnrealIRCd JOIN command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_mode"><strong>handle_mode</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_notice"><strong>handle_notice</strong></a> = <a href="#UnrealProtocol-handle_privmsg">handle_privmsg</a>(self, source, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_pass"><strong>handle_pass</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_ping"><strong>handle_ping</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_privmsg"><strong>handle_privmsg</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_protoctl"><strong>handle_protoctl</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_server"><strong>handle_server</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the SERVER command, which is used for both authentication and<br>
|
||||
introducing legacy (non-SID) servers.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_sethost"><strong>handle_sethost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGHOST, used for self hostname changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_setident"><strong>handle_setident</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SETIDENT, used for self ident changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_setname"><strong>handle_setname</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SETNAME, used for self real name/gecos changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_sid"><strong>handle_sid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the SID command, used for introducing remote servers by our uplink.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_sjoin"><strong>handle_sjoin</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the UnrealIRCd SJOIN command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the SQUIT command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_svs2mode"><strong>handle_svs2mode</strong></a>(self, sender, command, args)</dt><dd><tt>Handles SVS2MODE, which sets services login information, and user modes on<br>
|
||||
the given target.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_svsmode"><strong>handle_svsmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SVSMODE, used by services for setting user modes on others.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the TOPIC command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_umode2"><strong>handle_umode2</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles UMODE2, used to set user modes on oneself.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_whois"><strong>handle_whois</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles WHOIS queries.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-join"><strong>join</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-kill"><strong>kill</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-mode"><strong>mode</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client/server. The mode list should be<br>
|
||||
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-ping"><strong>ping</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
automatically by the Irc() internals; plugins shouldn't have to use this.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-sjoin"><strong>sjoin</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<br>
|
||||
The sender should always be a server (SID). TS is optional, and defaults<br>
|
||||
to the one we've stored in the channel state if not given.<br>
|
||||
<users> is a list of (prefix mode, UID) pairs:<br>
|
||||
<br>
|
||||
Example uses:<br>
|
||||
<a href="#Class-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])<br>
|
||||
<a href="#Class-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])<br>
|
||||
<br>
|
||||
Note that for UnrealIRCd, no mode data is sent in an SJOIN command, only<br>
|
||||
The channel name, TS, and user list.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-spawnClient"><strong>spawnClient</strong></a>(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, manipulatable=False)</dt><dd><tt>Spawns a client with nick <nick> on the given IRC connection.<br>
|
||||
<br>
|
||||
Note: No nick collision / valid nickname checks are done here; it is<br>
|
||||
up to plugins to make sure they don't introduce anything invalid.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-topicBurst"><strong>topicBurst</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident, host, or realname of any connected client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
||||
<dl><dt><a name="UnrealProtocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming NICK changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PART commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUIT commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_save"><strong>handle_save</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SAVE messages, used to handle nick collisions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#Class-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-spawnServer"><strong>spawnServer</strong></a>(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)</dt><dd><tt>Spawns a server off a PyLink server. desc (server description)<br>
|
||||
defaults to the one in the config. uplink defaults to the main PyLink<br>
|
||||
server, and sid (the server ID) is automatically generated if not<br>
|
||||
given.<br>
|
||||
<br>
|
||||
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay<br>
|
||||
option will be ignored if given.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><a name="UnrealProtocol-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-removeClient"><strong>removeClient</strong></a>(self, numeric)</dt><dd><tt>Internal function to remove a client from our internal state.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-updateTS"><strong>updateTS</strong></a>(self, channel, their_ts)</dt><dd><tt>Compares the current TS of the channel given with the new TS, resetting<br>
|
||||
all modes we have if the one given is older.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><strong>__dict__</strong></dt>
|
||||
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
||||
</dl>
|
||||
<dl><dt><strong>__weakref__</strong></dt>
|
||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
||||
</dl>
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="UnrealProtocol">class <strong>UnrealProtocol</strong></a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base Protocol module class for PyLink.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="unreal.html#UnrealProtocol">UnrealProtocol</a></dd>
|
||||
<dd><a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a></dd>
|
||||
<dd><a href="classes.html#Protocol">classes.Protocol</a></dd>
|
||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="UnrealProtocol-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-checkCloakChange"><strong>checkCloakChange</strong></a>(self, uid, parsedmodes)</dt><dd><tt>Checks whether +x/-x was set in the mode query, and changes the<br>
|
||||
hostname of the user given to or from their cloaked host if True.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_chghost"><strong>handle_chghost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGHOST, used for denoting hostname changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_chgident"><strong>handle_chgident</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGIDENT, used for denoting ident changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_chgname"><strong>handle_chgname</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGNAME, used for denoting real name/gecos changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_eos"><strong>handle_eos</strong></a>(self, numeric, command, args)</dt><dd><tt>EOS is used to denote end of burst.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_join"><strong>handle_join</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the UnrealIRCd JOIN command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_mode"><strong>handle_mode</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_notice"><strong>handle_notice</strong></a> = <a href="#UnrealProtocol-handle_privmsg">handle_privmsg</a>(self, source, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_pass"><strong>handle_pass</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_ping"><strong>handle_ping</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_privmsg"><strong>handle_privmsg</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PRIVMSG/NOTICE.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_protoctl"><strong>handle_protoctl</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_server"><strong>handle_server</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the SERVER command, which is used for both authentication and<br>
|
||||
introducing legacy (non-SID) servers.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_sethost"><strong>handle_sethost</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CHGHOST, used for self hostname changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_setident"><strong>handle_setident</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SETIDENT, used for self ident changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_setname"><strong>handle_setname</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SETNAME, used for self real name/gecos changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_sid"><strong>handle_sid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the SID command, used for introducing remote servers by our uplink.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_sjoin"><strong>handle_sjoin</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the UnrealIRCd SJOIN command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the SQUIT command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_svs2mode"><strong>handle_svs2mode</strong></a>(self, sender, command, args)</dt><dd><tt>Handles SVS2MODE, which sets services login information, and user modes on<br>
|
||||
the given target.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_svsmode"><strong>handle_svsmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SVSMODE, used by services for setting user modes on others.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_topic"><strong>handle_topic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the TOPIC command.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_umode2"><strong>handle_umode2</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles UMODE2, used to set user modes on oneself.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_whois"><strong>handle_whois</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles WHOIS queries.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends an INVITE from a PyLink client..</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-join"><strong>join</strong></a>(self, client, channel)</dt><dd><tt>Joins a PyLink client to a channel.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-kill"><strong>kill</strong></a>(self, numeric, target, reason)</dt><dd><tt>Sends a kill from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a KNOCK from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-mode"><strong>mode</strong></a>(self, numeric, target, modes, ts=None)</dt><dd><tt>Sends mode changes from a PyLink client/server. The mode list should be<br>
|
||||
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-ping"><strong>ping</strong></a>(self, source=None, target=None)</dt><dd><tt>Sends a PING to a target server. Periodic PINGs are sent to our uplink<br>
|
||||
automatically by the Irc() internals; plugins shouldn't have to use this.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-sjoin"><strong>sjoin</strong></a>(self, server, channel, users, ts=None)</dt><dd><tt>Sends an SJOIN for a group of users to a channel.<br>
|
||||
<br>
|
||||
The sender should always be a server (SID). TS is optional, and defaults<br>
|
||||
to the one we've stored in the channel state if not given.<br>
|
||||
<users> is a list of (prefix mode, UID) pairs:<br>
|
||||
<br>
|
||||
Example uses:<br>
|
||||
<a href="#UnrealProtocol-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])<br>
|
||||
<a href="#UnrealProtocol-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])<br>
|
||||
<br>
|
||||
Note that for UnrealIRCd, no mode data is sent in an SJOIN command, only<br>
|
||||
The channel name, TS, and user list.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-spawnClient"><strong>spawnClient</strong></a>(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype=None, manipulatable=False)</dt><dd><tt>Spawns a client with nick <nick> on the given IRC connection.<br>
|
||||
<br>
|
||||
Note: No nick collision / valid nickname checks are done here; it is<br>
|
||||
up to plugins to make sure they don't introduce anything invalid.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-topicBurst"><strong>topicBurst</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident, host, or realname of any connected client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
||||
<dl><dt><a name="UnrealProtocol-away"><strong>away</strong></a>(self, source, text)</dt><dd><tt>Sends an AWAY message from a PyLink client. <text> can be an empty string<br>
|
||||
to unset AWAY status.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_away"><strong>handle_away</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming AWAY messages.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_error"><strong>handle_error</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles ERROR messages - these mean that our uplink has disconnected us!</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for TS6 protocols.<br>
|
||||
<br>
|
||||
This passes most commands to the various handle_ABCD() functions<br>
|
||||
elsewhere defined protocol modules, coersing various sender prefixes<br>
|
||||
from nicks and server names to UIDs and SIDs respectively,<br>
|
||||
whenever possible.<br>
|
||||
<br>
|
||||
Commands sent without an explicit sender prefix will have them set to<br>
|
||||
the SID of the uplink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming NICK changes.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PART commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUIT commands.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-handle_save"><strong>handle_save</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SAVE messages, used to handle nick collisions.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-kick"><strong>kick</strong></a>(self, numeric, channel, target, reason=None)</dt><dd><tt>Sends kicks from a PyLink client/server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-message"><strong>message</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a PRIVMSG from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-nick"><strong>nick</strong></a>(self, numeric, newnick)</dt><dd><tt>Changes the nick of a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-notice"><strong>notice</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a NOTICE from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client, used for WHOIS<br>
|
||||
replies.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#UnrealProtocol-parseArgs">parseArgs</a>(), but stripping leading colons from the first argument<br>
|
||||
of a line (usually the sender field).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-part"><strong>part</strong></a>(self, client, channel, reason=None)</dt><dd><tt>Sends a part from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-spawnServer"><strong>spawnServer</strong></a>(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)</dt><dd><tt>Spawns a server off a PyLink server. desc (server description)<br>
|
||||
defaults to the one in the config. uplink defaults to the main PyLink<br>
|
||||
server, and sid (the server ID) is automatically generated if not<br>
|
||||
given.<br>
|
||||
<br>
|
||||
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay<br>
|
||||
option will be ignored if given.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-squit"><strong>squit</strong></a>(self, source, target, text='No reason given')</dt><dd><tt>SQUITs a PyLink server.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><a name="UnrealProtocol-parseArgs"><strong>parseArgs</strong></a>(self, args)</dt><dd><tt>Parses a string of <a href="http://www.rfc-editor.org/rfc/rfc1459.txt">RFC1459</a>-style arguments split into a list, where ":" may<br>
|
||||
be used for multi-word arguments that last until the end of a line.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-removeClient"><strong>removeClient</strong></a>(self, numeric)</dt><dd><tt>Internal function to remove a client from our internal state.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="UnrealProtocol-updateTS"><strong>updateTS</strong></a>(self, channel, their_ts)</dt><dd><tt>Compares the current TS of the channel given with the new TS, resetting<br>
|
||||
all modes we have if the one given is older.</tt></dd></dl>
|
||||
|
||||
<hr>
|
||||
Data descriptors inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
||||
<dl><dt><strong>__dict__</strong></dt>
|
||||
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
||||
</dl>
|
||||
<dl><dt><strong>__weakref__</strong></dt>
|
||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
||||
</dl>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7fa00e8c19d8>, {})}<br>
|
||||
<strong>confname</strong> = 'testconf'<br>
|
||||
<strong>curdir</strong> = '/home/gl/pylink'<br>
|
||||
<strong>files</strong> = None<br>
|
||||
<strong>log</strong> = <logging.RootLogger object><br>
|
||||
<strong>logdir</strong> = '/home/gl/pylink/log'<br>
|
||||
<strong>logformatter</strong> = <logging.Formatter object><br>
|
||||
<strong>stdout_level</strong> = 'CRITICAL'</td></tr></table>
|
||||
</body></html>
|
@ -82,7 +82,7 @@ Methods inherited from <a href="builtins.html#BaseException">builtins.BaseExcept
|
||||
|
||||
<dl><dt><a name="NotAuthenticatedError-__getattribute__"><strong>__getattribute__</strong></a>(self, name, /)</dt><dd><tt>Return getattr(self, name).</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="NotAuthenticatedError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
||||
<dl><dt><a name="NotAuthenticatedError-__reduce__"><strong>__reduce__</strong></a>(...)</dt><dd><tt>helper for pickle</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="NotAuthenticatedError-__repr__"><strong>__repr__</strong></a>(self, /)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
||||
|
||||
@ -133,7 +133,7 @@ Example queries:<br>
|
||||
"6##" would give: 600, 601, 602, ... 60Y, 60Z, 610, 611, ... 6ZZ (1296 total results)<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="TS6SIDGenerator-__init__"><strong>__init__</strong></a>(self, irc)</dt></dl>
|
||||
<dl><dt><a name="TS6SIDGenerator-__init__"><strong>__init__</strong></a>(self, irc)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6SIDGenerator-increment"><strong>increment</strong></a>(self, pos=2)</dt><dd><tt>Increments the SID generator to the next available SID.</tt></dd></dl>
|
||||
|
||||
@ -158,7 +158,7 @@ Data descriptors defined here:<br>
|
||||
https://github.com/inspircd/inspircd/blob/f449c6b296ab/src/server.cpp#L85-L156<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="TS6UIDGenerator-__init__"><strong>__init__</strong></a>(self, sid)</dt></dl>
|
||||
<dl><dt><a name="TS6UIDGenerator-__init__"><strong>__init__</strong></a>(self, sid)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="TS6UIDGenerator-increment"><strong>increment</strong></a>(self, pos=5)</dt><dd><tt>Increments the SID generator to the next available SID.</tt></dd></dl>
|
||||
|
||||
@ -186,7 +186,6 @@ Data descriptors defined here:<br>
|
||||
The target can be either a channel or a user; this is handled automatically.</tt></dd></dl>
|
||||
<dl><dt><a name="-checkAuthenticated"><strong>checkAuthenticated</strong></a>(irc, uid, allowAuthed=True, allowOper=True)</dt><dd><tt>Checks whether the given user has operator status on PyLink, raising<br>
|
||||
<a href="#NotAuthenticatedError">NotAuthenticatedError</a> and logging the access denial if not.</tt></dd></dl>
|
||||
<dl><dt><a name="-clientToServer"><strong>clientToServer</strong></a>(irc, numeric)</dt><dd><tt>Finds the SID of the server a user is on.</tt></dd></dl>
|
||||
<dl><dt><a name="-getDatabaseName"><strong>getDatabaseName</strong></a>(dbname)</dt><dd><tt>Returns a database filename with the given base DB name appropriate for the<br>
|
||||
current PyLink instance.<br>
|
||||
<br>
|
||||
@ -194,13 +193,13 @@ This returns '<dbname>.db' if the running co
|
||||
(config.yml), and '<dbname>-<config name>.db' for anything else. For example,<br>
|
||||
if this is called from an instance running as './pylink testing.yml', it<br>
|
||||
would return '<dbname>-testing.db'.</tt></dd></dl>
|
||||
<dl><dt><a name="-getHostmask"><strong>getHostmask</strong></a>(irc, user)</dt><dd><tt>Returns the hostmask of the given user, if present.</tt></dd></dl>
|
||||
<dl><dt><a name="-getHostmask"><strong>getHostmask</strong></a>(irc, user, realhost=False, ip=False)</dt><dd><tt>Returns the hostmask of the given user, if present. If the realhost option<br>
|
||||
is given, return the real host of the user instead of the displayed host.<br>
|
||||
If the ip option is given, return the IP address of the user (this overrides<br>
|
||||
realhost).</tt></dd></dl>
|
||||
<dl><dt><a name="-getProtocolModule"><strong>getProtocolModule</strong></a>(protoname)</dt><dd><tt>Imports and returns the protocol module requested.</tt></dd></dl>
|
||||
<dl><dt><a name="-isChannel"><strong>isChannel</strong></a>(s)</dt><dd><tt>Returns whether the string given is a valid channel name.</tt></dd></dl>
|
||||
<dl><dt><a name="-isHostmask"><strong>isHostmask</strong></a>(text)</dt><dd><tt>Returns whether the given text is a valid hostmask.</tt></dd></dl>
|
||||
<dl><dt><a name="-isInternalClient"><strong>isInternalClient</strong></a>(irc, numeric)</dt><dd><tt>Checks whether the given numeric is a PyLink Client,<br>
|
||||
returning the SID of the server it's on if so.</tt></dd></dl>
|
||||
<dl><dt><a name="-isInternalServer"><strong>isInternalServer</strong></a>(irc, sid)</dt><dd><tt>Returns whether the given SID is an internal PyLink server.</tt></dd></dl>
|
||||
<dl><dt><a name="-isManipulatableClient"><strong>isManipulatableClient</strong></a>(irc, uid)</dt><dd><tt>Returns whether the given user is marked as an internal, manipulatable<br>
|
||||
client. Usually, automatically spawned services clients should have this<br>
|
||||
set True to prevent interactions with opers (like mode changes) from<br>
|
||||
@ -217,7 +216,6 @@ joins them into a string.<br>
|
||||
<br>
|
||||
See testJoinModes in tests/test_utils.py for some examples.</tt></dd></dl>
|
||||
<dl><dt><a name="-loadModuleFromFolder"><strong>loadModuleFromFolder</strong></a>(name, folder)</dt><dd><tt>Imports and returns a module, if existing, from a specific folder.</tt></dd></dl>
|
||||
<dl><dt><a name="-nickToUid"><strong>nickToUid</strong></a>(irc, nick)</dt><dd><tt>Returns the UID of a user named nick, if present.</tt></dd></dl>
|
||||
<dl><dt><a name="-parseModes"><strong>parseModes</strong></a>(irc, target, args)</dt><dd><tt>Parses a modestring list into a list of (mode, argument) tuples.<br>
|
||||
['+mitl-o', '3', 'person'] => [('+m', None), ('+i', None), ('+t', None), ('+l', '3'), ('-o', 'person')]</tt></dd></dl>
|
||||
<dl><dt><a name="-reverseModes"><strong>reverseModes</strong></a>(irc, target, modes, oldobj=None)</dt><dd><tt>Reverses/Inverts the mode string or mode list given.<br>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>world</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/gl/pylink/world.py">/home/gl/pylink/world.py</a></font></td></tr></table>
|
||||
<p><tt>world.py: Stores global state variables for PyLink.</tt></p>
|
||||
<p><tt>world.py: Stores global variables for PyLink, including lists of active IRC objects and plugins.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
@ -33,11 +33,10 @@
|
||||
<strong>plugins</strong> = {}<br>
|
||||
<strong>plugins_folder</strong> = '/home/gl/pylink/plugins'<br>
|
||||
<strong>protocols_folder</strong> = '/home/gl/pylink/protocols'<br>
|
||||
<strong>schedulers</strong> = {}<br>
|
||||
<strong>source</strong> = 'https://github.com/GLolol/PyLink'<br>
|
||||
<strong>started</strong> = <threading.Event object><br>
|
||||
<strong>testing</strong> = True<br>
|
||||
<strong>testing_ircd</strong> = 'inspircd'<br>
|
||||
<strong>version</strong> = 'v0.5-dev-41-gbf2b256'<br>
|
||||
<strong>version</strong> = 'v0.6.1-dev-36-g2e8d63a'<br>
|
||||
<strong>whois_handlers</strong> = []</td></tr></table>
|
||||
</body></html>
|
20
docs/technical/update-autogen.sh
Executable file
20
docs/technical/update-autogen.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Deletes and updates the contents of the autogen/ folder
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
pwd
|
||||
shopt -s nullglob
|
||||
rm -v autogen/*.html
|
||||
|
||||
# cd to the main folder
|
||||
cd ../..
|
||||
pwd
|
||||
|
||||
# Iterate over all the .py files and run pydoc3 on them.
|
||||
for module in *.py protocols/*.py; do
|
||||
echo "Running pydoc3 -w ./$module"
|
||||
pydoc3 -w "./$module"
|
||||
# Then, move the generated HTML files to the right place.
|
||||
name="$(basename $module .py).html"
|
||||
mv "$name" "$SCRIPT_DIR/autogen/$name"
|
||||
done
|
Loading…
Reference in New Issue
Block a user