mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-02 23:54:08 +01:00
docs/technical: purge ancient autogen docs
This commit is contained in:
parent
9256500a23
commit
88281a3a54
@ -18,8 +18,6 @@ PyLink is an a modular, plugin-based IRC services framework. It uses swappable p
|
|||||||
- [PyLink hooks reference](hooks-reference.md)
|
- [PyLink hooks reference](hooks-reference.md)
|
||||||
- [Supported named channel modes](channel-modes.csv)
|
- [Supported named channel modes](channel-modes.csv)
|
||||||
- [Supported named user modes](user-modes.csv)
|
- [Supported named user modes](user-modes.csv)
|
||||||
- [API reference: utils.py](autogen/utils.html)
|
|
||||||
- [API reference: classes.py](autogen/classes.html)
|
|
||||||
|
|
||||||
### Future topics (not yet available)
|
### Future topics (not yet available)
|
||||||
- [Writing tests for PyLink modules](writing-tests.md)
|
- [Writing tests for PyLink modules](writing-tests.md)
|
||||||
|
@ -1,569 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module classes</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>classes</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/classes.py">/home/gl/pylink/classes.py</a></font></td></tr></table>
|
|
||||||
<p><tt>classes.py - Base classes for PyLink IRC Services.<br>
|
|
||||||
<br>
|
|
||||||
This module contains the base classes used by PyLink, including threaded IRC<br>
|
|
||||||
connections and objects used to represent IRC servers, users, and channels.<br>
|
|
||||||
<br>
|
|
||||||
Here be dragons.</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="inspect.html">inspect</a><br>
|
|
||||||
<a href="logging.html">logging</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
|
||||||
<a href="socket.html">socket</a><br>
|
|
||||||
<a href="ssl.html">ssl</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="structures.html">structures</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="builtins.html#Exception">builtins.Exception</a>(<a href="builtins.html#BaseException">builtins.BaseException</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="classes.html#ProtocolError">ProtocolError</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="classes.html#Irc">Irc</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="classes.html#FakeIRC">FakeIRC</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="classes.html#IrcChannel">IrcChannel</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="classes.html#IrcServer">IrcServer</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="classes.html#IrcUser">IrcUser</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="classes.html#Protocol">Protocol</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="classes.html#FakeProto">FakeProto</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
</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="FakeIRC">class <strong>FakeIRC</strong></a>(<a href="classes.html#Irc">Irc</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Fake IRC <a href="builtins.html#object">object</a> used for unit tests.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="classes.html#FakeIRC">FakeIRC</a></dd>
|
|
||||||
<dd><a href="classes.html#Irc">Irc</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods defined here:<br>
|
|
||||||
<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><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>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-takeHooks"><strong>takeHooks</strong></a>(self)</dt><dd><tt>Returns a list of hook arguments sent by the protocol module since<br>
|
|
||||||
the last <a href="#FakeIRC-takeHooks">takeHooks</a>() call.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-takeMsgs"><strong>takeMsgs</strong></a>(self)</dt><dd><tt>Returns a list of messages sent by the protocol module since<br>
|
|
||||||
the last <a href="#FakeIRC-takeMsgs">takeMsgs</a>() call, so we can track what has been sent.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="classes.html#Irc">Irc</a>:<br>
|
|
||||||
<dl><dt><a name="FakeIRC-__init__"><strong>__init__</strong></a>(self, netname, proto, conf)</dt><dd><tt>Initializes an IRC <a href="builtins.html#object">object</a>. This takes 3 variables: the network name<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><dd><tt>Return repr(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-applyModes"><strong>applyModes</strong></a>(self, target, changedmodes)</dt><dd><tt>Takes a list of parsed IRC modes, and applies them on the given target.<br>
|
|
||||||
<br>
|
|
||||||
The target can be either a channel or a user; this is handled automatically.</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-checkAuthenticated"><strong>checkAuthenticated</strong></a>(self, uid, allowAuthed=True, allowOper=True)</dt><dd><tt>Checks whether the given user has operator status on PyLink, raising<br>
|
|
||||||
NotAuthenticatedError and logging the access denial if not.</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-getHostmask"><strong>getHostmask</strong></a>(self, 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="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-isManipulatableClient"><strong>isManipulatableClient</strong></a>(self, 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>
|
|
||||||
causing desyncs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-isOper"><strong>isOper</strong></a>(self, uid, allowAuthed=True, allowOper=True)</dt><dd><tt>Returns whether the given user has operator status on PyLink. This can be achieved<br>
|
|
||||||
by either identifying to PyLink as admin (if allowAuthed is True),<br>
|
|
||||||
or having user mode +o set (if allowOper is True). At least one of<br>
|
|
||||||
allowAuthed or allowOper must be True for this to give any meaningful<br>
|
|
||||||
results.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-isServiceBot"><strong>isServiceBot</strong></a>(self, uid)</dt><dd><tt>Checks whether the given UID is a registered service bot. If True,<br>
|
|
||||||
returns the cooresponding ServiceBot <a href="builtins.html#object">object</a>.</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-parseModes"><strong>parseModes</strong></a>(self, 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="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-reverseModes"><strong>reverseModes</strong></a>(self, target, modes, oldobj=None)</dt><dd><tt>Reverses/Inverts the mode string or mode list given.<br>
|
|
||||||
<br>
|
|
||||||
Optionally, an oldobj argument can be given to look at an earlier state of<br>
|
|
||||||
a channel/user <a href="builtins.html#object">object</a>, e.g. for checking the op status of a mode setter<br>
|
|
||||||
before their modes are processed and added to the channel state.<br>
|
|
||||||
<br>
|
|
||||||
This function allows both mode strings or mode lists. Example uses:<br>
|
|
||||||
"+mi-lk test => "-mi+lk test"<br>
|
|
||||||
"mi-k test => "-mi+k test"<br>
|
|
||||||
[('+m', None), ('+r', None), ('+l', '3'), ('-o', 'person')<br>
|
|
||||||
=> {('-m', None), ('-r', None), ('-l', None), ('+o', 'person')})<br>
|
|
||||||
{('s', None), ('+o', 'whoever') => {('-s', None), ('-o', 'whoever')})</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>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-schedulePing"><strong>schedulePing</strong></a>(self)</dt><dd><tt>Schedules periodic pings in a loop.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-toLower"><strong>toLower</strong></a>(self, text)</dt><dd><tt>Returns a lowercase representation of text based on the IRC <a href="builtins.html#object">object</a>'s<br>
|
|
||||||
casemapping (rfc1459 or ascii).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeIRC-version"><strong>version</strong></a>(self)</dt><dd><tt>Returns a detailed version string including the PyLink daemon version,<br>
|
|
||||||
the protocol module in use, and the server hostname.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Static methods inherited from <a href="classes.html#Irc">Irc</a>:<br>
|
|
||||||
<dl><dt><a name="FakeIRC-joinModes"><strong>joinModes</strong></a>(modes)</dt><dd><tt>Takes a list of (mode, arg) tuples in <a href="#FakeIRC-parseModes">parseModes</a>() format, and<br>
|
|
||||||
joins them into a string.<br>
|
|
||||||
<br>
|
|
||||||
See testJoinModes in tests/test_utils.py for some examples.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors inherited from <a href="classes.html#Irc">Irc</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="FakeProto">class <strong>FakeProto</strong></a>(<a href="classes.html#Protocol">Protocol</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Dummy protocol module for testing purposes.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="classes.html#FakeProto">FakeProto</a></dd>
|
|
||||||
<dd><a href="classes.html#Protocol">Protocol</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods defined here:<br>
|
|
||||||
<dl><dt><a name="FakeProto-connect"><strong>connect</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeProto-handle_events"><strong>handle_events</strong></a>(self, data)</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>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data and other attributes defined here:<br>
|
|
||||||
<dl><dt><strong>Class</strong> = <class 'classes.FakeProto'><dd><tt>Dummy protocol module for testing purposes.</tt></dl>
|
|
||||||
|
|
||||||
<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>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>
|
|
||||||
|
|
||||||
<dl><dt><a name="FakeProto-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="FakeProto-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">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="Irc">class <strong>Irc</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Base IRC <a href="builtins.html#object">object</a> for PyLink.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="Irc-__init__"><strong>__init__</strong></a>(self, netname, proto, conf)</dt><dd><tt>Initializes an IRC <a href="builtins.html#object">object</a>. This takes 3 variables: the network name<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><dd><tt>Return repr(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-applyModes"><strong>applyModes</strong></a>(self, target, changedmodes)</dt><dd><tt>Takes a list of parsed IRC modes, and applies them on the given target.<br>
|
|
||||||
<br>
|
|
||||||
The target can be either a channel or a user; this is handled automatically.</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>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-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="Irc-checkAuthenticated"><strong>checkAuthenticated</strong></a>(self, uid, allowAuthed=True, allowOper=True)</dt><dd><tt>Checks whether the given user has operator status on PyLink, raising<br>
|
|
||||||
NotAuthenticatedError and logging the access denial if not.</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>Handle disconnects from the remote server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-getHostmask"><strong>getHostmask</strong></a>(self, 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="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-isManipulatableClient"><strong>isManipulatableClient</strong></a>(self, 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>
|
|
||||||
causing desyncs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-isOper"><strong>isOper</strong></a>(self, uid, allowAuthed=True, allowOper=True)</dt><dd><tt>Returns whether the given user has operator status on PyLink. This can be achieved<br>
|
|
||||||
by either identifying to PyLink as admin (if allowAuthed is True),<br>
|
|
||||||
or having user mode +o set (if allowOper is True). At least one of<br>
|
|
||||||
allowAuthed or allowOper must be True for this to give any meaningful<br>
|
|
||||||
results.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-isServiceBot"><strong>isServiceBot</strong></a>(self, uid)</dt><dd><tt>Checks whether the given UID is a registered service bot. If True,<br>
|
|
||||||
returns the cooresponding ServiceBot <a href="builtins.html#object">object</a>.</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-parseModes"><strong>parseModes</strong></a>(self, 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="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-reverseModes"><strong>reverseModes</strong></a>(self, target, modes, oldobj=None)</dt><dd><tt>Reverses/Inverts the mode string or mode list given.<br>
|
|
||||||
<br>
|
|
||||||
Optionally, an oldobj argument can be given to look at an earlier state of<br>
|
|
||||||
a channel/user <a href="builtins.html#object">object</a>, e.g. for checking the op status of a mode setter<br>
|
|
||||||
before their modes are processed and added to the channel state.<br>
|
|
||||||
<br>
|
|
||||||
This function allows both mode strings or mode lists. Example uses:<br>
|
|
||||||
"+mi-lk test => "-mi+lk test"<br>
|
|
||||||
"mi-k test => "-mi+k test"<br>
|
|
||||||
[('+m', None), ('+r', None), ('+l', '3'), ('-o', 'person')<br>
|
|
||||||
=> {('-m', None), ('-r', None), ('-l', None), ('+o', 'person')})<br>
|
|
||||||
{('s', None), ('+o', 'whoever') => {('-s', None), ('-o', 'whoever')})</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>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-runline"><strong>runline</strong></a>(self, line)</dt><dd><tt>Sends a command to the protocol module.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-schedulePing"><strong>schedulePing</strong></a>(self)</dt><dd><tt>Schedules periodic pings in a loop.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-send"><strong>send</strong></a>(self, data)</dt><dd><tt>Sends raw text to the uplink server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-toLower"><strong>toLower</strong></a>(self, text)</dt><dd><tt>Returns a lowercase representation of text based on the IRC <a href="builtins.html#object">object</a>'s<br>
|
|
||||||
casemapping (rfc1459 or ascii).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Irc-version"><strong>version</strong></a>(self)</dt><dd><tt>Returns a detailed version string including the PyLink daemon version,<br>
|
|
||||||
the protocol module in use, and the server hostname.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Static methods defined here:<br>
|
|
||||||
<dl><dt><a name="Irc-joinModes"><strong>joinModes</strong></a>(modes)</dt><dd><tt>Takes a list of (mode, arg) tuples in <a href="#Irc-parseModes">parseModes</a>() format, and<br>
|
|
||||||
joins them into a string.<br>
|
|
||||||
<br>
|
|
||||||
See testJoinModes in tests/test_utils.py for some examples.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="IrcChannel">class <strong>IrcChannel</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<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, name=None)</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><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>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-getPrefixModes"><strong>getPrefixModes</strong></a>(self, uid, prefixmodes=None)</dt><dd><tt>Returns a list of all named prefix modes the given user has in the channel.<br>
|
|
||||||
<br>
|
|
||||||
Optionally, a prefixmodes argument can be given to look at an earlier state of<br>
|
|
||||||
the channel's prefix modes mapping, e.g. for checking the op status of a mode<br>
|
|
||||||
setter before their modes are processed and added to the channel state.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isAdmin"><strong>isAdmin</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is admin (&) in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isHalfop"><strong>isHalfop</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is halfop in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isHalfopPlus"><strong>isHalfopPlus</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is halfop or above in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isOp"><strong>isOp</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is op in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isOpPlus"><strong>isOpPlus</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is op or above in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isOwner"><strong>isOwner</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is owner (~) in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isVoice"><strong>isVoice</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is voice in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-isVoicePlus"><strong>isVoicePlus</strong></a>(self, uid)</dt><dd><tt>Returns whether the given user is voice or above in the channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IrcChannel-removeuser"><strong>removeuser</strong></a>(self, target)</dt><dd><tt>Removes a user from a channel.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="IrcServer">class <strong>IrcServer</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>PyLink IRC server class.<br>
|
|
||||||
<br>
|
|
||||||
uplink: The SID of this <a href="#IrcServer">IrcServer</a> instance's uplink. This is set to None<br>
|
|
||||||
for the main PyLink PseudoServer!<br>
|
|
||||||
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><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><dd><tt>Return repr(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="IrcUser">class <strong>IrcUser</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<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, opertype='IRC Operator')</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><dd><tt>Return repr(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="Protocol">class <strong>Protocol</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<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>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>
|
|
||||||
|
|
||||||
<dl><dt><a name="Protocol-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="Protocol-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 defined here:<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="ProtocolError">class <strong>ProtocolError</strong></a>(<a href="builtins.html#Exception">builtins.Exception</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
<dd><a href="builtins.html#BaseException">builtins.BaseException</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<br>
|
|
||||||
<dl><dt><strong>__weakref__</strong></dt>
|
|
||||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="builtins.html#Exception">builtins.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="ProtocolError-__init__"><strong>__init__</strong></a>(self, /, *args, **kwargs)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ProtocolError-__new__"><strong>__new__</strong></a>(*args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Create and return a new <a href="builtins.html#object">object</a>. See help(type) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
|
|
||||||
<dl><dt><a name="ProtocolError-__delattr__"><strong>__delattr__</strong></a>(self, name, /)</dt><dd><tt>Implement delattr(self, name).</tt></dd></dl>
|
|
||||||
|
|
||||||
<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><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>
|
|
||||||
|
|
||||||
<dl><dt><a name="ProtocolError-__setattr__"><strong>__setattr__</strong></a>(self, name, value, /)</dt><dd><tt>Implement setattr(self, name, value).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ProtocolError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ProtocolError-__str__"><strong>__str__</strong></a>(self, /)</dt><dd><tt>Return str(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ProtocolError-with_traceback"><strong>with_traceback</strong></a>(...)</dt><dd><tt><a href="builtins.html#Exception">Exception</a>.<a href="#ProtocolError-with_traceback">with_traceback</a>(tb) --<br>
|
|
||||||
set self.<strong>__traceback__</strong> to tb and return self.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
|
|
||||||
<dl><dt><strong>__cause__</strong></dt>
|
|
||||||
<dd><tt>exception cause</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__context__</strong></dt>
|
|
||||||
<dd><tt>exception context</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__dict__</strong></dt>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__suppress_context__</strong></dt>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__traceback__</strong></dt>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>args</strong></dt>
|
|
||||||
</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 0x7fcfaf78de18>, {})}<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>
|
|
@ -1,54 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module conf</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>conf</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/conf.py">/home/gl/pylink/conf.py</a></font></td></tr></table>
|
|
||||||
<p><tt>conf.py - PyLink configuration core.<br>
|
|
||||||
<br>
|
|
||||||
This module is used to access the complete configuration for the current<br>
|
|
||||||
PyLink instance. It will load the config on first import, taking the<br>
|
|
||||||
configuration file name from the first command-line argument, but defaulting<br>
|
|
||||||
to 'config.yml' if this isn't given.<br>
|
|
||||||
<br>
|
|
||||||
If world.testing is set to True, it will return a preset testing configuration<br>
|
|
||||||
instead.<br>
|
|
||||||
<br>
|
|
||||||
This module also provides simple checks for validating and loading YAML-format<br>
|
|
||||||
configurations from arbitrary files.</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="sys.html">sys</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="world.html">world</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="yaml.html">yaml</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="#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="-loadConf"><strong>loadConf</strong></a>(fname, errors_fatal=True)</dt><dd><tt>Loads a PyLink configuration file from the filename given.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-validateConf"><strong>validateConf</strong></a>(conf)</dt><dd><tt>Validates a parsed configuration dict.</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': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7fee74c229d8>, {})}<br>
|
|
||||||
<strong>confname</strong> = 'testconf'<br>
|
|
||||||
<strong>fname</strong> = None<br>
|
|
||||||
<strong>testconf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7fee74c229d8>, {})}</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,77 +0,0 @@
|
|||||||
<!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="classes.html">classes</a><br>
|
|
||||||
<a href="conf.html">conf</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="gc.html">gc</a><br>
|
|
||||||
<a href="os.html">os</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="signal.html">signal</a><br>
|
|
||||||
<a href="sys.html">sys</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="#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 service bots (PRIVMSG).</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-handle_disconnect"><strong>handle_disconnect</strong></a>(irc, source, command, args)</dt><dd><tt>Handles network disconnections.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-handle_endburst"><strong>handle_endburst</strong></a>(irc, source, command, args)</dt><dd><tt>Handles network bursts.</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 PyLink service bots, 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 PyLink service bots, respawning them 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_version"><strong>handle_version</strong></a>(irc, source, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</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="-rehash"><strong>rehash</strong></a>(irc, source, args)</dt><dd><tt>takes no arguments.<br>
|
|
||||||
<br>
|
|
||||||
Reloads the configuration file for PyLink, (dis)connecting added/removed networks.<br>
|
|
||||||
Plugins must be manually reloaded.</tt></dd></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="-sighup_handler"><strong>sighup_handler</strong></a>(_signo, _stack_frame)</dt><dd><tt>Handles SIGHUP by rehashing the PyLink daemon.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-sigterm_handler"><strong>sigterm_handler</strong></a>(_signo, _stack_frame)</dt><dd><tt>Handles SIGTERM gracefully by shutting down the PyLink daemon.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-spawn_service"><strong>spawn_service</strong></a>(irc, source, command, args)</dt><dd><tt>Handles new service bot introductions.</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><br>
|
|
||||||
<strong>myident</strong> = 'pylink'<br>
|
|
||||||
<strong>mynick</strong> = 'PyLink'</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,470 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module hybrid</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>hybrid</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/hybrid.py">/home/gl/pylink/protocols/hybrid.py</a></font></td></tr></table>
|
|
||||||
<p></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="inspect.html">inspect</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>
|
|
||||||
<a href="string.html">string</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="structures.html">structures</a><br>
|
|
||||||
<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.html#TS6Protocol">ts6.TS6Protocol</a>(<a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="hybrid.html#HybridProtocol">HybridProtocol</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 HybridProtocol</a>(<a href="ts6.html#TS6Protocol">ts6.TS6Protocol</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="hybrid.html#HybridProtocol">HybridProtocol</a></dd>
|
|
||||||
<dd><a href="ts6.html#TS6Protocol">ts6.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="HybridProtocol-__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="HybridProtocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-handle_eob"><strong>handle_eob</strong></a>(self, numeric, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_svsmode"><strong>handle_svsmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SVSMODE, which is used for sending services metadata<br>
|
|
||||||
(vhosts, account logins), and other forced usermode changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_tburst"><strong>handle_tburst</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming topic burst (TBURST) commands.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles Hybrid-style UID commands (user introduction). This is INCOMPATIBLE<br>
|
|
||||||
with standard TS6 implementations, as the arguments are slightly different.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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 new client with the given options.<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="HybridProtocol-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="HybridProtocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident, host, or realname of a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="ts6.html#TS6Protocol">ts6.TS6Protocol</a>:<br>
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol">class <strong>HybridProtocol</strong></a>(<a href="ts6.html#TS6Protocol">ts6.TS6Protocol</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="hybrid.html#HybridProtocol">HybridProtocol</a></dd>
|
|
||||||
<dd><a href="ts6.html#TS6Protocol">ts6.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="HybridProtocol-__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="HybridProtocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-handle_eob"><strong>handle_eob</strong></a>(self, numeric, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_svsmode"><strong>handle_svsmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles SVSMODE, which is used for sending services metadata<br>
|
|
||||||
(vhosts, account logins), and other forced usermode changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_tburst"><strong>handle_tburst</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming topic burst (TBURST) commands.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_uid"><strong>handle_uid</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles Hybrid-style UID commands (user introduction). This is INCOMPATIBLE<br>
|
|
||||||
with standard TS6 implementations, as the arguments are slightly different.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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 new client with the given options.<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="HybridProtocol-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="HybridProtocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident, host, or realname of a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="ts6.html#TS6Protocol">ts6.TS6Protocol</a>:<br>
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-handle_invite"><strong>handle_invite</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="#HybridProtocol-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])<br>
|
|
||||||
<a href="#HybridProtocol-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="ts6_common.html#TS6BaseProtocol">ts6_common.TS6BaseProtocol</a>:<br>
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-handle_kill"><strong>handle_kill</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-parseTS6Args"><strong>parseTS6Args</strong></a>(self, args)</dt><dd><tt>Similar to <a href="#HybridProtocol-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="HybridProtocol-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="HybridProtocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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="HybridProtocol-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 0x7f737f074378>, {})}<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>
|
|
@ -1,462 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module inspircd</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>inspircd</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/inspircd.py">/home/gl/pylink/protocols/inspircd.py</a></font></td></tr></table>
|
|
||||||
<p><tt>inspircd.py: InspIRCd 2.x 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="hashlib.html">hashlib</a><br>
|
|
||||||
<a href="inspect.html">inspect</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>
|
|
||||||
<a href="string.html">string</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="structures.html">structures</a><br>
|
|
||||||
<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="inspircd.html#InspIRCdProtocol">InspIRCdProtocol</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 InspIRCdProtocol</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="inspircd.html#InspIRCdProtocol">InspIRCdProtocol</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="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-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>
|
|
||||||
<br>
|
|
||||||
For InspIRCd, the only ENCAP command we handle right now is KNOCK.</tt></dd></dl>
|
|
||||||
|
|
||||||
<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_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>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_fjoin"><strong>handle_fjoin</strong></a>(self, servernumeric, command, args)</dt><dd><tt>Handles incoming FJOIN commands (InspIRCd equivalent of JOIN/SJOIN).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_fmode"><strong>handle_fmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the FMODE command, used for channel mode changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_fname"><strong>handle_fname</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles FNAME, used for denoting real name/gecos changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_ftopic"><strong>handle_ftopic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming FTOPIC (sets topic on burst).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_idle"><strong>handle_idle</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the IDLE command, sent between servers in remote WHOIS queries.</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>
|
|
||||||
<br>
|
|
||||||
This calls the internal hook CLIENT_OPERED, sets the internal<br>
|
|
||||||
opertype of the client, and assumes setting user mode +o on the caller.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_ping"><strong>handle_ping</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PING commands, so we don't time out.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PONG commands.<br>
|
|
||||||
<br>
|
|
||||||
This is used to keep track of whether the uplink is alive by the Irc()<br>
|
|
||||||
internals - a server that fails to reply to our PINGs eventually<br>
|
|
||||||
times out and is disconnected.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_rsquit"><strong>handle_rsquit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the RSQUIT command, which is sent by opers to SQUIT remote<br>
|
|
||||||
servers.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_server"><strong>handle_server</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SERVER commands (introduction of servers).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_svstopic"><strong>handle_svstopic</strong></a> = <a href="#InspIRCdProtocol-handle_ftopic">handle_ftopic</a>(self, numeric, command, args)</dt></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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Stub VERSION handler (does nothing) to override the one in ts6_common.</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-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-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-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-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-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-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-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'), ('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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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="InspIRCdProtocol-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>
|
|
||||||
If endburst_delay is set greater than zero, the sending of ENDBURST<br>
|
|
||||||
will be delayed by the amount given. This can be used to prevent<br>
|
|
||||||
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-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-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, 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>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="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-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-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-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-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-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-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits 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>
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol">class <strong>InspIRCdProtocol</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="inspircd.html#InspIRCdProtocol">InspIRCdProtocol</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="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-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>
|
|
||||||
<br>
|
|
||||||
For InspIRCd, the only ENCAP command we handle right now is KNOCK.</tt></dd></dl>
|
|
||||||
|
|
||||||
<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_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>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_fjoin"><strong>handle_fjoin</strong></a>(self, servernumeric, command, args)</dt><dd><tt>Handles incoming FJOIN commands (InspIRCd equivalent of JOIN/SJOIN).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_fmode"><strong>handle_fmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the FMODE command, used for channel mode changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_fname"><strong>handle_fname</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles FNAME, used for denoting real name/gecos changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_ftopic"><strong>handle_ftopic</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming FTOPIC (sets topic on burst).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_idle"><strong>handle_idle</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the IDLE command, sent between servers in remote WHOIS queries.</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>
|
|
||||||
<br>
|
|
||||||
This calls the internal hook CLIENT_OPERED, sets the internal<br>
|
|
||||||
opertype of the client, and assumes setting user mode +o on the caller.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_ping"><strong>handle_ping</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PING commands, so we don't time out.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PONG commands.<br>
|
|
||||||
<br>
|
|
||||||
This is used to keep track of whether the uplink is alive by the Irc()<br>
|
|
||||||
internals - a server that fails to reply to our PINGs eventually<br>
|
|
||||||
times out and is disconnected.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_rsquit"><strong>handle_rsquit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles the RSQUIT command, which is sent by opers to SQUIT remote<br>
|
|
||||||
servers.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_server"><strong>handle_server</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SERVER commands (introduction of servers).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-handle_svstopic"><strong>handle_svstopic</strong></a> = <a href="#InspIRCdProtocol-handle_ftopic">handle_ftopic</a>(self, numeric, command, args)</dt></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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Stub VERSION handler (does nothing) to override the one in ts6_common.</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-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-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-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-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-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-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-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-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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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="InspIRCdProtocol-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>
|
|
||||||
If endburst_delay is set greater than zero, the sending of ENDBURST<br>
|
|
||||||
will be delayed by the amount given. This can be used to prevent<br>
|
|
||||||
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-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-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, 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>
|
|
||||||
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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="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-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-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-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-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-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-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits 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>
|
|
||||||
<dl><dt><a name="InspIRCdProtocol-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="InspIRCdProtocol-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="InspIRCdProtocol-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 0x7ff146c496a8>, {})}<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>
|
|
@ -1,166 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module log</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>log</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/log.py">/home/gl/pylink/log.py</a></font></td></tr></table>
|
|
||||||
<p><tt>log.py - PyLink logging module.<br>
|
|
||||||
<br>
|
|
||||||
This module contains the logging portion of the PyLink framework. Plugins can<br>
|
|
||||||
access the global logger object by importing "log" from this module<br>
|
|
||||||
(from log import log).</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="logging.html">logging</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="sys.html">sys</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="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': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7f496c510e18>, {})}<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>
|
|
@ -1,475 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module nefarious</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>nefarious</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/nefarious.py">/home/gl/pylink/protocols/nefarious.py</a></font></td></tr></table>
|
|
||||||
<p><tt>nefarious.py: Nefarious IRCu 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="base64.html">base64</a><br>
|
|
||||||
<a href="hashlib.html">hashlib</a><br>
|
|
||||||
<a href="inspect.html">inspect</a><br>
|
|
||||||
<a href="logging.html">logging</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
|
||||||
<a href="socket.html">socket</a><br>
|
|
||||||
<a href="ssl.html">ssl</a><br>
|
|
||||||
<a href="struct.html">struct</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="structures.html">structures</a><br>
|
|
||||||
<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="builtins.html#object">builtins.object</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="nefarious.html#P10SIDGenerator">P10SIDGenerator</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<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="nefarious.html#P10Protocol">P10Protocol</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a>(<a href="builtins.html#object">builtins.object</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="nefarious.html#P10UIDGenerator">P10UIDGenerator</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 P10Protocol</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="nefarious.html#P10Protocol">P10Protocol</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="P10Protocol-__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="P10Protocol-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="P10Protocol-checkCloakChange"><strong>checkCloakChange</strong></a>(self, uid)</dt><dd><tt>Checks for cloak changes on the given UID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_account"><strong>handle_account</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles services account changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-handle_burst"><strong>handle_burst</strong></a>(self, source, command, args)</dt><dd><tt>Handles the BURST command, used for bursting channels on link.<br>
|
|
||||||
<br>
|
|
||||||
This is equivalent to SJOIN on most IRCds.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_clearmode"><strong>handle_clearmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CLEARMODE, which is used to clear a channel's modes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_create"><strong>handle_create</strong></a> = <a href="#P10Protocol-handle_join">handle_join</a>(self, source, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_end_of_burst"><strong>handle_end_of_burst</strong></a>(self, source, command, args)</dt><dd><tt>Handles end of burst from our uplink.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for the P10 protocol.<br>
|
|
||||||
<br>
|
|
||||||
This passes most commands to the various handle_ABCD() functions defined elsewhere in the<br>
|
|
||||||
protocol modules, coersing various sender prefixes from nicks and server names to P10<br>
|
|
||||||
"numeric nicks", whenever possible.<br>
|
|
||||||
<br>
|
|
||||||
Commands sent without an explicit sender prefix are treated as originating from the uplink<br>
|
|
||||||
server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_fake"><strong>handle_fake</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming FAKE hostmask changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_invite"><strong>handle_invite</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_join"><strong>handle_join</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming JOINs and channel creations.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_kill"><strong>handle_kill</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_mode"><strong>handle_mode</strong></a>(self, source, command, args)</dt><dd><tt>Handles mode changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_nick"><strong>handle_nick</strong></a>(self, source, command, args)</dt><dd><tt>Handles the NICK command, used for user introductions and nick changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_notice"><strong>handle_notice</strong></a> = <a href="#P10Protocol-handle_privmsg">handle_privmsg</a>(self, source, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_opmode"><strong>handle_opmode</strong></a> = <a href="#P10Protocol-handle_mode">handle_mode</a>(self, source, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles user parts.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_pass"><strong>handle_pass</strong></a>(self, source, command, args)</dt><dd><tt>Handles authentication with our uplink.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_ping"><strong>handle_ping</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PING requests.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PONGs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUITs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_server"><strong>handle_server</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming server introductions.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SQUITs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_topic"><strong>handle_topic</strong></a>(self, source, command, args)</dt><dd><tt>Handles TOPIC changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_whois"><strong>handle_whois</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming WHOIS requests.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends INVITEs from a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client. This is used for WHOIS<br>
|
|
||||||
replies.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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="P10Protocol-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="P10Protocol-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="P10Protocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident or host of any connected client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Static methods defined here:<br>
|
|
||||||
<dl><dt><a name="P10Protocol-decode_p10_ip"><strong>decode_p10_ip</strong></a>(ip)</dt><dd><tt>Decodes a P10 IP.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol">class <strong>P10Protocol</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="nefarious.html#P10Protocol">P10Protocol</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="P10Protocol-__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="P10Protocol-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="P10Protocol-checkCloakChange"><strong>checkCloakChange</strong></a>(self, uid)</dt><dd><tt>Checks for cloak changes on the given UID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Initializes a connection to a server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_account"><strong>handle_account</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles services account changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-handle_burst"><strong>handle_burst</strong></a>(self, source, command, args)</dt><dd><tt>Handles the BURST command, used for bursting channels on link.<br>
|
|
||||||
<br>
|
|
||||||
This is equivalent to SJOIN on most IRCds.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_clearmode"><strong>handle_clearmode</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles CLEARMODE, which is used to clear a channel's modes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_create"><strong>handle_create</strong></a> = <a href="#P10Protocol-handle_join">handle_join</a>(self, source, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_end_of_burst"><strong>handle_end_of_burst</strong></a>(self, source, command, args)</dt><dd><tt>Handles end of burst from our uplink.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_events"><strong>handle_events</strong></a>(self, data)</dt><dd><tt>Event handler for the P10 protocol.<br>
|
|
||||||
<br>
|
|
||||||
This passes most commands to the various handle_ABCD() functions defined elsewhere in the<br>
|
|
||||||
protocol modules, coersing various sender prefixes from nicks and server names to P10<br>
|
|
||||||
"numeric nicks", whenever possible.<br>
|
|
||||||
<br>
|
|
||||||
Commands sent without an explicit sender prefix are treated as originating from the uplink<br>
|
|
||||||
server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_fake"><strong>handle_fake</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming FAKE hostmask changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_invite"><strong>handle_invite</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming INVITEs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_join"><strong>handle_join</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming JOINs and channel creations.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_kick"><strong>handle_kick</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming KICKs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_kill"><strong>handle_kill</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming KILLs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_mode"><strong>handle_mode</strong></a>(self, source, command, args)</dt><dd><tt>Handles mode changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_nick"><strong>handle_nick</strong></a>(self, source, command, args)</dt><dd><tt>Handles the NICK command, used for user introductions and nick changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_notice"><strong>handle_notice</strong></a> = <a href="#P10Protocol-handle_privmsg">handle_privmsg</a>(self, source, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_opmode"><strong>handle_opmode</strong></a> = <a href="#P10Protocol-handle_mode">handle_mode</a>(self, source, command, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_part"><strong>handle_part</strong></a>(self, source, command, args)</dt><dd><tt>Handles user parts.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_pass"><strong>handle_pass</strong></a>(self, source, command, args)</dt><dd><tt>Handles authentication with our uplink.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_ping"><strong>handle_ping</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PING requests.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_pong"><strong>handle_pong</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming PONGs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-handle_quit"><strong>handle_quit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming QUITs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_server"><strong>handle_server</strong></a>(self, source, command, args)</dt><dd><tt>Handles incoming server introductions.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_squit"><strong>handle_squit</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming SQUITs.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_topic"><strong>handle_topic</strong></a>(self, source, command, args)</dt><dd><tt>Handles TOPIC changes.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-handle_whois"><strong>handle_whois</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming WHOIS requests.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-invite"><strong>invite</strong></a>(self, numeric, target, channel)</dt><dd><tt>Sends INVITEs from a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol-knock"><strong>knock</strong></a>(self, numeric, target, text)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10Protocol-numeric"><strong>numeric</strong></a>(self, source, numeric, target, text)</dt><dd><tt>Sends raw numerics from a server to a remote client. This is used for WHOIS<br>
|
|
||||||
replies.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-quit"><strong>quit</strong></a>(self, numeric, reason)</dt><dd><tt>Quits a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="#P10Protocol-sjoin">sjoin</a>('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])<br>
|
|
||||||
<a href="#P10Protocol-sjoin">sjoin</a>(self.<strong>irc</strong>.sid, '#test', [('o', self.<strong>irc</strong>.pseudoclient.uid)])</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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="P10Protocol-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="P10Protocol-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="P10Protocol-topic"><strong>topic</strong></a>(self, numeric, target, text)</dt><dd><tt>Sends a TOPIC change from a PyLink client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-updateClient"><strong>updateClient</strong></a>(self, target, field, text)</dt><dd><tt>Updates the ident or host of any connected client.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Static methods defined here:<br>
|
|
||||||
<dl><dt><a name="P10Protocol-decode_p10_ip"><strong>decode_p10_ip</strong></a>(ip)</dt><dd><tt>Decodes a P10 IP.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="classes.html#Protocol">classes.Protocol</a>:<br>
|
|
||||||
<dl><dt><a name="P10Protocol-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="P10Protocol-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="P10Protocol-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="P10SIDGenerator">class <strong>P10SIDGenerator</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="P10SIDGenerator-__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="P10SIDGenerator-next_sid"><strong>next_sid</strong></a>(self)</dt><dd><tt>Returns the next available SID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="P10UIDGenerator">class <strong>P10UIDGenerator</strong></a>(<a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Implements an incremental P10 UID Generator.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="nefarious.html#P10UIDGenerator">P10UIDGenerator</a></dd>
|
|
||||||
<dd><a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods defined here:<br>
|
|
||||||
<dl><dt><a name="P10UIDGenerator-__init__"><strong>__init__</strong></a>(self, sid)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a>:<br>
|
|
||||||
<dl><dt><a name="P10UIDGenerator-increment"><strong>increment</strong></a>(self, pos=None)</dt><dd><tt>Increments the UID generator to the next available UID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="P10UIDGenerator-next_uid"><strong>next_uid</strong></a>(self)</dt><dd><tt>Returns the next unused UID for the server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors inherited from <a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</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="-p10b64encode"><strong>p10b64encode</strong></a>(num, length=2)</dt><dd><tt>Encodes a given numeric using P10 Base64 numeric nicks, as documented at<br>
|
|
||||||
https://github.com/evilnet/nefarious2/blob/a29b63144/doc/p10.txt#L69-L92</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': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7fcf7b6db510>, {})}<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>
|
|
@ -1,194 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module structures</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>structures</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/structures.py">/home/gl/pylink/structures.py</a></font></td></tr></table>
|
|
||||||
<p><tt>structures.py - PyLink data structures module.<br>
|
|
||||||
<br>
|
|
||||||
This module contains custom data structures that may be useful in various situations.</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="collections.html">collections</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="json.html">json</a><br>
|
|
||||||
</td><td width="25%" valign=top></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="builtins.html#object">builtins.object</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="structures.html#DataStore">DataStore</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="collections.html#defaultdict">collections.defaultdict</a>(<a href="builtins.html#dict">builtins.dict</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="structures.html#KeyedDefaultdict">KeyedDefaultdict</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="DataStore">class <strong>DataStore</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="DataStore-__contains__"><strong>__contains__</strong></a>(self, key)</dt><dd><tt># single keys</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-__init__"><strong>__init__</strong></a>(self, name, filename, db_format='json', save_frequency={'seconds': 30})</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-create_or_load"><strong>create_or_load</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-delete"><strong>delete</strong></a>(self, key)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-delete_keys"><strong>delete_keys</strong></a>(self, prefix)</dt><dd><tt>Delete all keys with the given prefix.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-get"><strong>get</strong></a>(self, key, default=None)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-list_keys"><strong>list_keys</strong></a>(self, prefix=None)</dt><dd><tt>Return all key names. If prefix given, return only keys that start with it.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-put"><strong>put</strong></a>(self, key, value)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-save"><strong>save</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DataStore-save_callback"><strong>save_callback</strong></a>(self, starting=False)</dt><dd><tt>Start the DB save loop.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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>
|
|
||||||
<hr>
|
|
||||||
Data and other attributes defined here:<br>
|
|
||||||
<dl><dt><strong>initial_version</strong> = 1</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="KeyedDefaultdict">class <strong>KeyedDefaultdict</strong></a>(<a href="collections.html#defaultdict">collections.defaultdict</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Subclass of <a href="collections.html#defaultdict">defaultdict</a> allowing the key to be passed to the default factory.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="structures.html#KeyedDefaultdict">KeyedDefaultdict</a></dd>
|
|
||||||
<dd><a href="collections.html#defaultdict">collections.defaultdict</a></dd>
|
|
||||||
<dd><a href="builtins.html#dict">builtins.dict</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods defined here:<br>
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__missing__"><strong>__missing__</strong></a>(self, key)</dt><dd><tt><a href="#KeyedDefaultdict-__missing__">__missing__</a>(key) # Called by __getitem__ for missing key; pseudo-code:<br>
|
|
||||||
if self.<strong>default_factory</strong> is None: raise KeyError((key,))<br>
|
|
||||||
self[key] = value = self.<a href="#KeyedDefaultdict-default_factory">default_factory</a>()<br>
|
|
||||||
return value</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="collections.html#defaultdict">collections.defaultdict</a>:<br>
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__copy__"><strong>__copy__</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-copy">copy</a>() -> a shallow copy of D.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__getattribute__"><strong>__getattribute__</strong></a>(self, name, /)</dt><dd><tt>Return getattr(self, name).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__init__"><strong>__init__</strong></a>(self, /, *args, **kwargs)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__reduce__"><strong>__reduce__</strong></a>(...)</dt><dd><tt>Return state information for pickling.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__repr__"><strong>__repr__</strong></a>(self, /)</dt><dd><tt>Return repr(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-copy"><strong>copy</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-copy">copy</a>() -> a shallow copy of D.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors inherited from <a href="collections.html#defaultdict">collections.defaultdict</a>:<br>
|
|
||||||
<dl><dt><strong>default_factory</strong></dt>
|
|
||||||
<dd><tt>Factory for default value called by __missing__().</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="builtins.html#dict">builtins.dict</a>:<br>
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__contains__"><strong>__contains__</strong></a>(self, key, /)</dt><dd><tt>True if D has a key k, else False.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__delitem__"><strong>__delitem__</strong></a>(self, key, /)</dt><dd><tt>Delete self[key].</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__eq__"><strong>__eq__</strong></a>(self, value, /)</dt><dd><tt>Return self==value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__ge__"><strong>__ge__</strong></a>(self, value, /)</dt><dd><tt>Return self>=value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#KeyedDefaultdict-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__gt__"><strong>__gt__</strong></a>(self, value, /)</dt><dd><tt>Return self>value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__iter__"><strong>__iter__</strong></a>(self, /)</dt><dd><tt>Implement iter(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__le__"><strong>__le__</strong></a>(self, value, /)</dt><dd><tt>Return self<=value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__len__"><strong>__len__</strong></a>(self, /)</dt><dd><tt>Return len(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__lt__"><strong>__lt__</strong></a>(self, value, /)</dt><dd><tt>Return self<value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__ne__"><strong>__ne__</strong></a>(self, value, /)</dt><dd><tt>Return self!=value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__new__"><strong>__new__</strong></a>(*args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Create and return a new <a href="builtins.html#object">object</a>. See help(type) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__setitem__"><strong>__setitem__</strong></a>(self, key, value, /)</dt><dd><tt>Set self[key] to value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-__sizeof__">__sizeof__</a>() -> size of D in memory, in bytes</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-clear"><strong>clear</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-clear">clear</a>() -> None. Remove all items from D.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-fromkeys"><strong>fromkeys</strong></a>(iterable, value=None, /)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Returns a new dict with keys from iterable and values equal to value.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-get"><strong>get</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-get">get</a>(k[,d]) -> D[k] if k in D, else d. d defaults to None.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-items"><strong>items</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-items">items</a>() -> a set-like <a href="builtins.html#object">object</a> providing a view on D's items</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-keys"><strong>keys</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-keys">keys</a>() -> a set-like <a href="builtins.html#object">object</a> providing a view on D's keys</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-pop"><strong>pop</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-pop">pop</a>(k[,d]) -> v, remove specified key and return the corresponding value.<br>
|
|
||||||
If key is not found, d is returned if given, otherwise KeyError is raised</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-popitem"><strong>popitem</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-popitem">popitem</a>() -> (k, v), remove and return some (key, value) pair as a<br>
|
|
||||||
2-tuple; but raise KeyError if D is empty.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-setdefault"><strong>setdefault</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-setdefault">setdefault</a>(k[,d]) -> D.<a href="#KeyedDefaultdict-get">get</a>(k,d), also set D[k]=d if k not in D</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-update"><strong>update</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-update">update</a>([E, ]**F) -> None. Update D from dict/iterable E and F.<br>
|
|
||||||
If E is present and has a .<a href="#KeyedDefaultdict-keys">keys</a>() method, then does: for k in E: D[k] = E[k]<br>
|
|
||||||
If E is present and lacks a .<a href="#KeyedDefaultdict-keys">keys</a>() method, then does: for k, v in E: D[k] = v<br>
|
|
||||||
In either case, this is followed by: for k in F: D[k] = F[k]</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="KeyedDefaultdict-values"><strong>values</strong></a>(...)</dt><dd><tt>D.<a href="#KeyedDefaultdict-values">values</a>() -> an <a href="builtins.html#object">object</a> providing a view on D's values</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data and other attributes inherited from <a href="builtins.html#dict">builtins.dict</a>:<br>
|
|
||||||
<dl><dt><strong>__hash__</strong> = None</dl>
|
|
||||||
|
|
||||||
</td></tr></table></td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,448 +0,0 @@
|
|||||||
<!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="inspect.html">inspect</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>
|
|
||||||
<a href="string.html">string</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="structures.html">structures</a><br>
|
|
||||||
<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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</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 0x7f3f91da9488>, {})}<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>
|
|
@ -1,249 +0,0 @@
|
|||||||
<!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="inspect.html">inspect</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="string.html">string</a><br>
|
|
||||||
<a href="structures.html">structures</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></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="builtins.html#object">builtins.object</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="ts6_common.html#TS6SIDGenerator">TS6SIDGenerator</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<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>
|
|
||||||
<dt><font face="helvetica, arial"><a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a>(<a href="builtins.html#object">builtins.object</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="ts6_common.html#TS6UIDGenerator">TS6UIDGenerator</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-__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-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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</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-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> <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="TS6SIDGenerator">class <strong>TS6SIDGenerator</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>TS6 SID Generator. <query> is a 3 character string with any combination of<br>
|
|
||||||
uppercase letters, digits, and #'s. it must contain at least one #,<br>
|
|
||||||
which are used by the generator as a wildcard. On every <a href="#TS6SIDGenerator-next_sid">next_sid</a>() call,<br>
|
|
||||||
the first available wildcard character (from the right) will be<br>
|
|
||||||
incremented to generate the next SID.<br>
|
|
||||||
<br>
|
|
||||||
When there are no more available SIDs left (SIDs are not reused, only<br>
|
|
||||||
incremented), RuntimeError is raised.<br>
|
|
||||||
<br>
|
|
||||||
Example queries:<br>
|
|
||||||
"1#A" would give: 10A, 11A, 12A ... 19A, 1AA, 1BA ... 1ZA (36 total results)<br>
|
|
||||||
"#BQ" would give: 0BQ, 1BQ, 2BQ ... 9BQ (10 total results)<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><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>
|
|
||||||
|
|
||||||
<dl><dt><a name="TS6SIDGenerator-next_sid"><strong>next_sid</strong></a>(self)</dt><dd><tt>Returns the next unused TS6 SID for the server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="TS6UIDGenerator">class <strong>TS6UIDGenerator</strong></a>(<a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Implements an incremental TS6 UID Generator.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="ts6_common.html#TS6UIDGenerator">TS6UIDGenerator</a></dd>
|
|
||||||
<dd><a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods defined here:<br>
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</a>:<br>
|
|
||||||
<dl><dt><a name="TS6UIDGenerator-increment"><strong>increment</strong></a>(self, pos=None)</dt><dd><tt>Increments the UID generator to the next available UID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="TS6UIDGenerator-next_uid"><strong>next_uid</strong></a>(self)</dt><dd><tt>Returns the next unused UID for the server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors inherited from <a href="utils.html#IncrementalUIDGenerator">utils.IncrementalUIDGenerator</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 0x7f1e3a24e488>, {})}<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>
|
|
@ -1,455 +0,0 @@
|
|||||||
<!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="inspect.html">inspect</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>
|
|
||||||
<a href="ssl.html">ssl</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="string.html">string</a><br>
|
|
||||||
<a href="structures.html">structures</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_kill"><strong>handle_kill</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming KILLs.</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_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles NICK changes, and legacy NICK introductions from pre-4.0 servers.</tt></dd></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><dd><tt>Handles protocol negotiation.</tt></dd></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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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_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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</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_kill"><strong>handle_kill</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles incoming KILLs.</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_nick"><strong>handle_nick</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles NICK changes, and legacy NICK introductions from pre-4.0 servers.</tt></dd></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><dd><tt>Handles protocol negotiation.</tt></dd></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='IRC Operator', manipulatable=False)</dt><dd><tt>Spawns a new client with the given options.<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_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-handle_version"><strong>handle_version</strong></a>(self, numeric, command, args)</dt><dd><tt>Handles requests for the PyLink server version.</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 0x7f19895c4bf8>, {})}<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>
|
|
@ -1,220 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module utils</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>utils</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/utils.py">/home/gl/pylink/utils.py</a></font></td></tr></table>
|
|
||||||
<p><tt>utils.py - PyLink utilities module.<br>
|
|
||||||
<br>
|
|
||||||
This module contains various utility functions related to IRC and/or the PyLink<br>
|
|
||||||
framework.</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="collections.html">collections</a><br>
|
|
||||||
<a href="conf.html">conf</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="importlib.html">importlib</a><br>
|
|
||||||
<a href="os.html">os</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="re.html">re</a><br>
|
|
||||||
<a href="string.html">string</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="builtins.html#Exception">builtins.Exception</a>(<a href="builtins.html#BaseException">builtins.BaseException</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="utils.html#NotAuthenticatedError">NotAuthenticatedError</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="utils.html#IncrementalUIDGenerator">IncrementalUIDGenerator</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="utils.html#ServiceBot">ServiceBot</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="IncrementalUIDGenerator">class <strong>IncrementalUIDGenerator</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Incremental UID Generator module, adapted from InspIRCd source:<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="IncrementalUIDGenerator-__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="IncrementalUIDGenerator-increment"><strong>increment</strong></a>(self, pos=None)</dt><dd><tt>Increments the UID generator to the next available UID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="IncrementalUIDGenerator-next_uid"><strong>next_uid</strong></a>(self)</dt><dd><tt>Returns the next unused UID for the server.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="NotAuthenticatedError">class <strong>NotAuthenticatedError</strong></a>(<a href="builtins.html#Exception">builtins.Exception</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt><a href="builtins.html#Exception">Exception</a> raised by checkAuthenticated() when a user fails authentication<br>
|
|
||||||
requirements.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="utils.html#NotAuthenticatedError">NotAuthenticatedError</a></dd>
|
|
||||||
<dd><a href="builtins.html#Exception">builtins.Exception</a></dd>
|
|
||||||
<dd><a href="builtins.html#BaseException">builtins.BaseException</a></dd>
|
|
||||||
<dd><a href="builtins.html#object">builtins.object</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<br>
|
|
||||||
<dl><dt><strong>__weakref__</strong></dt>
|
|
||||||
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="builtins.html#Exception">builtins.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-__init__"><strong>__init__</strong></a>(self, /, *args, **kwargs)</dt><dd><tt>Initialize self. See help(type(self)) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-__new__"><strong>__new__</strong></a>(*args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Create and return a new <a href="builtins.html#object">object</a>. See help(type) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-__delattr__"><strong>__delattr__</strong></a>(self, name, /)</dt><dd><tt>Implement delattr(self, name).</tt></dd></dl>
|
|
||||||
|
|
||||||
<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><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>
|
|
||||||
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-__setattr__"><strong>__setattr__</strong></a>(self, name, value, /)</dt><dd><tt>Implement setattr(self, name, value).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-__str__"><strong>__str__</strong></a>(self, /)</dt><dd><tt>Return str(self).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="NotAuthenticatedError-with_traceback"><strong>with_traceback</strong></a>(...)</dt><dd><tt><a href="builtins.html#Exception">Exception</a>.<a href="#NotAuthenticatedError-with_traceback">with_traceback</a>(tb) --<br>
|
|
||||||
set self.<strong>__traceback__</strong> to tb and return self.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
|
|
||||||
<dl><dt><strong>__cause__</strong></dt>
|
|
||||||
<dd><tt>exception cause</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__context__</strong></dt>
|
|
||||||
<dd><tt>exception context</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__dict__</strong></dt>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__suppress_context__</strong></dt>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>__traceback__</strong></dt>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>args</strong></dt>
|
|
||||||
</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="ServiceBot">class <strong>ServiceBot</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="ServiceBot-__init__"><strong>__init__</strong></a>(self, name, default_help=True, default_request=False, default_list=True, nick=None, ident=None, manipulatable=False)</dt><dd><tt>Initialize self. See <a href="#ServiceBot-help">help</a>(type(self)) for accurate signature.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-add_cmd"><strong>add_cmd</strong></a>(self, func, name=None)</dt><dd><tt>Binds an IRC command function to the given command name.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-call_cmd"><strong>call_cmd</strong></a>(self, irc, source, text, called_by=None, notice=True)</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="ServiceBot-help"><strong>help</strong></a>(self, irc, source, args)</dt><dd><tt><command><br>
|
|
||||||
<br>
|
|
||||||
Gives help for <command>, if it is available.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-listcommands"><strong>listcommands</strong></a>(self, irc, source, args)</dt><dd><tt>takes no arguments.<br>
|
|
||||||
<br>
|
|
||||||
Returns a list of available commands this service has to offer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-remove"><strong>remove</strong></a>(self, irc, source, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-reply"><strong>reply</strong></a>(self, irc, text)</dt><dd><tt>Replies to a message using the right service UID.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-request"><strong>request</strong></a>(self, irc, source, args)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ServiceBot-spawn"><strong>spawn</strong></a>(self, irc=None)</dt></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Data descriptors defined here:<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="-add_cmd"><strong>add_cmd</strong></a>(func, name=None)</dt><dd><tt>Binds an IRC command function to the given command name.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-add_hook"><strong>add_hook</strong></a>(func, command)</dt><dd><tt>Binds a hook function to the given command name.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-applyModes"><strong>applyModes</strong></a>(irc, target, changedmodes)</dt><dd><tt>Takes a list of parsed IRC modes, and applies them on the given target.<br>
|
|
||||||
<br>
|
|
||||||
The target can be either a channel or a user; this is handled automatically.<br>
|
|
||||||
<br>
|
|
||||||
This method is deprecated. Use irc.<a href="#-applyModes">applyModes</a>() instead.</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>
|
|
||||||
This returns '<dbname>.db' if the running config name is PyLink's default<br>
|
|
||||||
(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="-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="-isNick"><strong>isNick</strong></a>(s, nicklen=None)</dt><dd><tt>Returns whether the string given is a valid nick.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-isServerName"><strong>isServerName</strong></a>(s)</dt><dd><tt>Returns whether the string given is a valid IRC server name.</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="-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')]<br>
|
|
||||||
<br>
|
|
||||||
This method is deprecated. Use irc.<a href="#-parseModes">parseModes</a>() instead.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-registerService"><strong>registerService</strong></a>(name, *args, **kwargs)</dt><dd><tt>Registers a service bot.</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-unregisterService"><strong>unregisterService</strong></a>(name)</dt><dd><tt>Unregisters an existing service bot.</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>hostmaskRe</strong> = re.compile('^\\S+!\\S+@\\S+$')<br>
|
|
||||||
<strong>log</strong> = <logging.RootLogger object></td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,41 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module world</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>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 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">
|
|
||||||
<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="os.html">os</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="subprocess.html">subprocess</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="threading.html">threading</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="#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>hooks</strong> = defaultdict(<class 'list'>, {})<br>
|
|
||||||
<strong>networkobjects</strong> = {}<br>
|
|
||||||
<strong>plugins</strong> = {}<br>
|
|
||||||
<strong>plugins_folder</strong> = '/home/gl/pylink/plugins'<br>
|
|
||||||
<strong>protocols_folder</strong> = '/home/gl/pylink/protocols'<br>
|
|
||||||
<strong>services</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.8-alpha2-60-g8c55eb4'</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
In PyLink, each protocol module is a single file consisting of a protocol class, and a global `Class` attribute that is set equal to it (e.g. `Class = InspIRCdProtocol`). These classes should be based off of either [`classes.Protocol`](https://github.com/GLolol/PyLink/blob/e4fb64aebaf542122c70a8f3a49061386a00b0ca/classes.py#L532), a boilerplate class that only defines a few basic things, or something like [`ts6_common.TS6BaseProtocol`](https://github.com/GLolol/PyLink/blob/0.9-alpha1/protocols/ts6_common.py). (`ts6_common.TS6BaseProtocol` includes elements of the TS6 protocol that are shared by the InspIRCd, UnrealIRCd, and TS6 protocols.) IRC objects load protocol modules by creating an instance of its main class, and sends it commands accordingly.
|
In PyLink, each protocol module is a single file consisting of a protocol class, and a global `Class` attribute that is set equal to it (e.g. `Class = InspIRCdProtocol`). These classes should be based off of either [`classes.Protocol`](https://github.com/GLolol/PyLink/blob/e4fb64aebaf542122c70a8f3a49061386a00b0ca/classes.py#L532), a boilerplate class that only defines a few basic things, or something like [`ts6_common.TS6BaseProtocol`](https://github.com/GLolol/PyLink/blob/0.9-alpha1/protocols/ts6_common.py). (`ts6_common.TS6BaseProtocol` includes elements of the TS6 protocol that are shared by the InspIRCd, UnrealIRCd, and TS6 protocols.) IRC objects load protocol modules by creating an instance of its main class, and sends it commands accordingly.
|
||||||
|
|
||||||
See also: [autogen/inspircd.html](autogen/inspircd.html) for auto-generated documentation the InspIRCd protocol module.
|
|
||||||
|
|
||||||
## Tasks
|
## Tasks
|
||||||
|
|
||||||
Protocol modules have some very important jobs. If any of these aren't done correctly, you will be left with a broken, desynced services server:
|
Protocol modules have some very important jobs. If any of these aren't done correctly, you will be left with a broken, desynced services server:
|
||||||
|
@ -1 +0,0 @@
|
|||||||
See [autogen/utils.html](autogen/utils.html) for auto-generated documentation for the utils module.
|
|
Loading…
Reference in New Issue
Block a user