| |
- ts6_common.TS6BaseProtocol(classes.Protocol)
-
- TS6Protocol
Class = class TS6Protocol(ts6_common.TS6BaseProtocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- TS6Protocol
- ts6_common.TS6BaseProtocol
- classes.Protocol
- builtins.object
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- connect(self)
- Initializes a connection to a server.
- handle_472(self, numeric, command, args)
- Handles the incoming 472 numeric.
472 is sent to us when one of our clients tries to set a mode the uplink
server doesn't support. In this case, we'll raise a warning to alert
the administrator that certain extensions should be loaded for the best
compatibility.
- handle_bmask(self, numeric, command, args)
- Handles incoming BMASK commands (ban propagation on burst).
- handle_capab(self, numeric, command, args)
- Handles the CAPAB command, used for TS6 capability negotiation.
- handle_chghost(self, numeric, command, args)
- Handles incoming CHGHOST commands.
- handle_encap(self, numeric, command, args)
- Handles the ENCAP command - encapsulated TS6 commands with a variety of
subcommands used for different purposes.
- handle_euid(self, numeric, command, args)
- Handles incoming EUID commands (user introduction).
- handle_invite(self, numeric, command, args)
- Handles incoming INVITEs.
- handle_join(self, numeric, command, args)
- Handles incoming channel JOINs.
- handle_mode(self, numeric, command, args)
- Handles incoming user mode changes.
- handle_pass(self, numeric, command, args)
- Handles the PASS command, used to send the server's SID and negotiate
passwords on connect.
- handle_ping(self, source, command, args)
- Handles incoming PING commands.
- handle_pong(self, source, command, args)
- Handles incoming PONG commands.
- handle_server(self, numeric, command, args)
- Handles 1) incoming legacy (no SID) server introductions,
2) Sending server data in initial connection.
- handle_sid(self, numeric, command, args)
- Handles incoming server introductions.
- handle_sjoin(self, servernumeric, command, args)
- Handles incoming SJOIN commands.
- handle_tb(self, numeric, command, args)
- Handles incoming topic burst (TB) commands.
- handle_tmode(self, numeric, command, args)
- Handles incoming TMODE commands (channel mode change).
- handle_uid(self, numeric, command, args)
- handle_whois(self, numeric, command, args)
- Handles incoming WHOIS commands.
Note: The core of WHOIS handling is done by coreplugin.py
(IRCd-independent), and not here.
- invite(self, numeric, target, channel)
- Sends an INVITE from a PyLink client..
- join(self, client, channel)
- Joins a PyLink client to a channel.
- kill(self, numeric, target, reason)
- Sends a kill from a PyLink client/server.
- knock(self, numeric, target, text)
- Sends a KNOCK from a PyLink client.
- mode(self, numeric, target, modes, ts=None)
- Sends mode changes from a PyLink client/server.
- ping(self, source=None, target=None)
- Sends a PING to a target server. Periodic PINGs are sent to our uplink
automatically by the Irc() internals; plugins shouldn't have to use this.
- sjoin(self, server, channel, users, ts=None)
- Sends an SJOIN for a group of users to a channel.
The sender should always be a Server ID (SID). TS is optional, and defaults
to the one we've stored in the channel state if not given.
<users> is a list of (prefix mode, UID) pairs:
Example uses:
sjoin('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])
sjoin(self.irc.sid, '#test', [('o', self.irc.pseudoclient.uid)])
- spawnClient(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)
- Spawns a client with nick <nick> on the given IRC connection.
Note: No nick collision / valid nickname checks are done here; it is
up to plugins to make sure they don't introduce anything invalid.
- topicBurst(self, numeric, target, text)
- Sends a topic change from a PyLink server. This is usually used on burst.
- updateClient(self, target, field, text)
- Updates the hostname of any connected client.
Methods inherited from ts6_common.TS6BaseProtocol:
- away(self, source, text)
- Sends an AWAY message from a PyLink client. <text> can be an empty string
to unset AWAY status.
- handle_away(self, numeric, command, args)
- Handles incoming AWAY messages.
- handle_error(self, numeric, command, args)
- Handles ERROR messages - these mean that our uplink has disconnected us!
- handle_events(self, data)
- Event handler for TS6 protocols.
This passes most commands to the various handle_ABCD() functions
elsewhere defined protocol modules, coersing various sender prefixes
from nicks and server names to UIDs and SIDs respectively,
whenever possible.
Commands sent without an explicit sender prefix will have them set to
the SID of the uplink server.
- handle_kick(self, source, command, args)
- Handles incoming KICKs.
- handle_kill(self, source, command, args)
- Handles incoming KILLs.
- handle_nick(self, numeric, command, args)
- Handles incoming NICK changes.
- handle_notice = handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_part(self, source, command, args)
- Handles incoming PART commands.
- handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_quit(self, numeric, command, args)
- Handles incoming QUIT commands.
- handle_save(self, numeric, command, args)
- Handles incoming SAVE messages, used to handle nick collisions.
- handle_squit(self, numeric, command, args)
- Handles incoming SQUITs (netsplits).
- handle_topic(self, numeric, command, args)
- Handles incoming TOPIC changes from clients. For topic bursts,
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.
- handle_version(self, numeric, command, args)
- Handles requests for the PyLink server version.
- kick(self, numeric, channel, target, reason=None)
- Sends kicks from a PyLink client/server.
- message(self, numeric, target, text)
- Sends a PRIVMSG from a PyLink client.
- nick(self, numeric, newnick)
- Changes the nick of a PyLink client.
- notice(self, numeric, target, text)
- Sends a NOTICE from a PyLink client.
- numeric(self, source, numeric, target, text)
- Sends raw numerics from a server to a remote client, used for WHOIS
replies.
- parseTS6Args(self, args)
- Similar to parseArgs(), but stripping leading colons from the first argument
of a line (usually the sender field).
- part(self, client, channel, reason=None)
- Sends a part from a PyLink client.
- quit(self, numeric, reason)
- Quits a PyLink client.
- spawnServer(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)
- Spawns a server off a PyLink server. desc (server description)
defaults to the one in the config. uplink defaults to the main PyLink
server, and sid (the server ID) is automatically generated if not
given.
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay
option will be ignored if given.
- squit(self, source, target, text='No reason given')
- SQUITs a PyLink server.
- topic(self, numeric, target, text)
- Sends a TOPIC change from a PyLink client.
Methods inherited from classes.Protocol:
- parseArgs(self, args)
- Parses a string of RFC1459-style arguments split into a list, where ":" may
be used for multi-word arguments that last until the end of a line.
- removeClient(self, numeric)
- Internal function to remove a client from our internal state.
- updateTS(self, channel, their_ts)
- Compares the current TS of the channel given with the new TS, resetting
all modes we have if the one given is older.
Data descriptors inherited from classes.Protocol:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class TS6Protocol(ts6_common.TS6BaseProtocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- TS6Protocol
- ts6_common.TS6BaseProtocol
- classes.Protocol
- builtins.object
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- connect(self)
- Initializes a connection to a server.
- handle_472(self, numeric, command, args)
- Handles the incoming 472 numeric.
472 is sent to us when one of our clients tries to set a mode the uplink
server doesn't support. In this case, we'll raise a warning to alert
the administrator that certain extensions should be loaded for the best
compatibility.
- handle_bmask(self, numeric, command, args)
- Handles incoming BMASK commands (ban propagation on burst).
- handle_capab(self, numeric, command, args)
- Handles the CAPAB command, used for TS6 capability negotiation.
- handle_chghost(self, numeric, command, args)
- Handles incoming CHGHOST commands.
- handle_encap(self, numeric, command, args)
- Handles the ENCAP command - encapsulated TS6 commands with a variety of
subcommands used for different purposes.
- handle_euid(self, numeric, command, args)
- Handles incoming EUID commands (user introduction).
- handle_invite(self, numeric, command, args)
- Handles incoming INVITEs.
- handle_join(self, numeric, command, args)
- Handles incoming channel JOINs.
- handle_mode(self, numeric, command, args)
- Handles incoming user mode changes.
- handle_pass(self, numeric, command, args)
- Handles the PASS command, used to send the server's SID and negotiate
passwords on connect.
- handle_ping(self, source, command, args)
- Handles incoming PING commands.
- handle_pong(self, source, command, args)
- Handles incoming PONG commands.
- handle_server(self, numeric, command, args)
- Handles 1) incoming legacy (no SID) server introductions,
2) Sending server data in initial connection.
- handle_sid(self, numeric, command, args)
- Handles incoming server introductions.
- handle_sjoin(self, servernumeric, command, args)
- Handles incoming SJOIN commands.
- handle_tb(self, numeric, command, args)
- Handles incoming topic burst (TB) commands.
- handle_tmode(self, numeric, command, args)
- Handles incoming TMODE commands (channel mode change).
- handle_uid(self, numeric, command, args)
- handle_whois(self, numeric, command, args)
- Handles incoming WHOIS commands.
Note: The core of WHOIS handling is done by coreplugin.py
(IRCd-independent), and not here.
- invite(self, numeric, target, channel)
- Sends an INVITE from a PyLink client..
- join(self, client, channel)
- Joins a PyLink client to a channel.
- kill(self, numeric, target, reason)
- Sends a kill from a PyLink client/server.
- knock(self, numeric, target, text)
- Sends a KNOCK from a PyLink client.
- mode(self, numeric, target, modes, ts=None)
- Sends mode changes from a PyLink client/server.
- ping(self, source=None, target=None)
- Sends a PING to a target server. Periodic PINGs are sent to our uplink
automatically by the Irc() internals; plugins shouldn't have to use this.
- sjoin(self, server, channel, users, ts=None)
- Sends an SJOIN for a group of users to a channel.
The sender should always be a Server ID (SID). TS is optional, and defaults
to the one we've stored in the channel state if not given.
<users> is a list of (prefix mode, UID) pairs:
Example uses:
sjoin('100', '#test', [('', '100AAABBC'), ('o', 100AAABBB'), ('v', '100AAADDD')])
sjoin(self.irc.sid, '#test', [('o', self.irc.pseudoclient.uid)])
- spawnClient(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)
- Spawns a client with nick <nick> on the given IRC connection.
Note: No nick collision / valid nickname checks are done here; it is
up to plugins to make sure they don't introduce anything invalid.
- topicBurst(self, numeric, target, text)
- Sends a topic change from a PyLink server. This is usually used on burst.
- updateClient(self, target, field, text)
- Updates the hostname of any connected client.
Methods inherited from ts6_common.TS6BaseProtocol:
- away(self, source, text)
- Sends an AWAY message from a PyLink client. <text> can be an empty string
to unset AWAY status.
- handle_away(self, numeric, command, args)
- Handles incoming AWAY messages.
- handle_error(self, numeric, command, args)
- Handles ERROR messages - these mean that our uplink has disconnected us!
- handle_events(self, data)
- Event handler for TS6 protocols.
This passes most commands to the various handle_ABCD() functions
elsewhere defined protocol modules, coersing various sender prefixes
from nicks and server names to UIDs and SIDs respectively,
whenever possible.
Commands sent without an explicit sender prefix will have them set to
the SID of the uplink server.
- handle_kick(self, source, command, args)
- Handles incoming KICKs.
- handle_kill(self, source, command, args)
- Handles incoming KILLs.
- handle_nick(self, numeric, command, args)
- Handles incoming NICK changes.
- handle_notice = handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_part(self, source, command, args)
- Handles incoming PART commands.
- handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_quit(self, numeric, command, args)
- Handles incoming QUIT commands.
- handle_save(self, numeric, command, args)
- Handles incoming SAVE messages, used to handle nick collisions.
- handle_squit(self, numeric, command, args)
- Handles incoming SQUITs (netsplits).
- handle_topic(self, numeric, command, args)
- Handles incoming TOPIC changes from clients. For topic bursts,
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead.
- handle_version(self, numeric, command, args)
- Handles requests for the PyLink server version.
- kick(self, numeric, channel, target, reason=None)
- Sends kicks from a PyLink client/server.
- message(self, numeric, target, text)
- Sends a PRIVMSG from a PyLink client.
- nick(self, numeric, newnick)
- Changes the nick of a PyLink client.
- notice(self, numeric, target, text)
- Sends a NOTICE from a PyLink client.
- numeric(self, source, numeric, target, text)
- Sends raw numerics from a server to a remote client, used for WHOIS
replies.
- parseTS6Args(self, args)
- Similar to parseArgs(), but stripping leading colons from the first argument
of a line (usually the sender field).
- part(self, client, channel, reason=None)
- Sends a part from a PyLink client.
- quit(self, numeric, reason)
- Quits a PyLink client.
- spawnServer(self, name, sid=None, uplink=None, desc=None, endburst_delay=0)
- Spawns a server off a PyLink server. desc (server description)
defaults to the one in the config. uplink defaults to the main PyLink
server, and sid (the server ID) is automatically generated if not
given.
Note: TS6 doesn't use a specific ENDBURST command, so the endburst_delay
option will be ignored if given.
- squit(self, source, target, text='No reason given')
- SQUITs a PyLink server.
- topic(self, numeric, target, text)
- Sends a TOPIC change from a PyLink client.
Methods inherited from classes.Protocol:
- parseArgs(self, args)
- Parses a string of RFC1459-style arguments split into a list, where ":" may
be used for multi-word arguments that last until the end of a line.
- removeClient(self, numeric)
- Internal function to remove a client from our internal state.
- updateTS(self, channel, their_ts)
- Compares the current TS of the channel given with the new TS, resetting
all modes we have if the one given is older.
Data descriptors inherited from classes.Protocol:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |