| |
- builtins.object
-
- P10SIDGenerator
- classes.Protocol(builtins.object)
-
- P10Protocol
- utils.IncrementalUIDGenerator(builtins.object)
-
- P10UIDGenerator
Class = class P10Protocol(classes.Protocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- P10Protocol
- classes.Protocol
- builtins.object
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- away(self, source, text)
- Sends an AWAY message from a PyLink client. <text> can be an empty string
to unset AWAY status.
- checkCloakChange(self, uid)
- Checks for cloak changes on the given UID.
- connect(self)
- Initializes a connection to a server.
- handle_account(self, numeric, command, args)
- Handles services account changes.
- handle_away(self, numeric, command, args)
- Handles incoming AWAY messages.
- handle_burst(self, source, command, args)
- Handles the BURST command, used for bursting channels on link.
This is equivalent to SJOIN on most IRCds.
- handle_clearmode(self, numeric, command, args)
- Handles CLEARMODE, which is used to clear a channel's modes.
- handle_create = handle_join(self, source, command, args)
- handle_end_of_burst(self, source, command, args)
- Handles end of burst from our uplink.
- handle_events(self, data)
- Event handler for the P10 protocol.
This passes most commands to the various handle_ABCD() functions defined elsewhere in the
protocol modules, coersing various sender prefixes from nicks and server names to P10
"numeric nicks", whenever possible.
Commands sent without an explicit sender prefix are treated as originating from the uplink
server.
- handle_fake(self, numeric, command, args)
- Handles incoming FAKE hostmask changes.
- handle_invite(self, source, command, args)
- Handles incoming INVITEs.
- handle_join(self, source, command, args)
- Handles incoming JOINs and channel creations.
- handle_kick(self, source, command, args)
- Handles incoming KICKs.
- handle_kill(self, numeric, command, args)
- Handles incoming KILLs.
- handle_mode(self, source, command, args)
- Handles mode changes.
- handle_nick(self, source, command, args)
- Handles the NICK command, used for user introductions and nick changes.
- handle_notice = handle_privmsg(self, source, command, args)
- handle_opmode = handle_mode(self, source, command, args)
- handle_part(self, source, command, args)
- Handles user parts.
- handle_pass(self, source, command, args)
- Handles authentication with our uplink.
- handle_ping(self, source, command, args)
- Handles incoming PING requests.
- handle_pong(self, source, command, args)
- Handles incoming PONGs.
- handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_quit(self, numeric, command, args)
- Handles incoming QUITs.
- handle_server(self, source, command, args)
- Handles incoming server introductions.
- handle_squit(self, numeric, command, args)
- Handles incoming SQUITs.
- handle_topic(self, source, command, args)
- Handles TOPIC changes.
- handle_version(self, numeric, command, args)
- Handles requests for the PyLink server version.
- handle_whois(self, numeric, command, args)
- Handles incoming WHOIS requests.
- invite(self, numeric, target, channel)
- Sends INVITEs from a PyLink client.
- join(self, client, channel)
- Joins a PyLink client to a channel.
- kick(self, numeric, channel, target, reason=None)
- Sends kicks from a PyLink client/server.
- kill(self, numeric, target, reason)
- Sends a kill from a PyLink client/server.
- knock(self, numeric, target, text)
- message(self, numeric, target, text)
- Sends a PRIVMSG from a PyLink client.
- mode(self, numeric, target, modes, ts=None)
- Sends mode changes from a PyLink client/server.
- 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. This is used for WHOIS
replies.
- part(self, client, channel, reason=None)
- Sends a part from a PyLink client.
- 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.
- quit(self, numeric, reason)
- Quits a PyLink client.
- 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='IRC Operator', manipulatable=False)
- Spawns a new client with the given options.
Note: No nick collision / valid nickname checks are done here; it is
up to plugins to make sure they don't introduce anything invalid.
- 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.
- topicBurst(self, numeric, target, text)
- Sends a TOPIC change from a PyLink server.
- updateClient(self, target, field, text)
- Updates the ident or host of any connected client.
Static methods defined here:
- decode_p10_ip(ip)
- Decodes a P10 IP.
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 P10Protocol(classes.Protocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- P10Protocol
- classes.Protocol
- builtins.object
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- away(self, source, text)
- Sends an AWAY message from a PyLink client. <text> can be an empty string
to unset AWAY status.
- checkCloakChange(self, uid)
- Checks for cloak changes on the given UID.
- connect(self)
- Initializes a connection to a server.
- handle_account(self, numeric, command, args)
- Handles services account changes.
- handle_away(self, numeric, command, args)
- Handles incoming AWAY messages.
- handle_burst(self, source, command, args)
- Handles the BURST command, used for bursting channels on link.
This is equivalent to SJOIN on most IRCds.
- handle_clearmode(self, numeric, command, args)
- Handles CLEARMODE, which is used to clear a channel's modes.
- handle_create = handle_join(self, source, command, args)
- handle_end_of_burst(self, source, command, args)
- Handles end of burst from our uplink.
- handle_events(self, data)
- Event handler for the P10 protocol.
This passes most commands to the various handle_ABCD() functions defined elsewhere in the
protocol modules, coersing various sender prefixes from nicks and server names to P10
"numeric nicks", whenever possible.
Commands sent without an explicit sender prefix are treated as originating from the uplink
server.
- handle_fake(self, numeric, command, args)
- Handles incoming FAKE hostmask changes.
- handle_invite(self, source, command, args)
- Handles incoming INVITEs.
- handle_join(self, source, command, args)
- Handles incoming JOINs and channel creations.
- handle_kick(self, source, command, args)
- Handles incoming KICKs.
- handle_kill(self, numeric, command, args)
- Handles incoming KILLs.
- handle_mode(self, source, command, args)
- Handles mode changes.
- handle_nick(self, source, command, args)
- Handles the NICK command, used for user introductions and nick changes.
- handle_notice = handle_privmsg(self, source, command, args)
- handle_opmode = handle_mode(self, source, command, args)
- handle_part(self, source, command, args)
- Handles user parts.
- handle_pass(self, source, command, args)
- Handles authentication with our uplink.
- handle_ping(self, source, command, args)
- Handles incoming PING requests.
- handle_pong(self, source, command, args)
- Handles incoming PONGs.
- handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_quit(self, numeric, command, args)
- Handles incoming QUITs.
- handle_server(self, source, command, args)
- Handles incoming server introductions.
- handle_squit(self, numeric, command, args)
- Handles incoming SQUITs.
- handle_topic(self, source, command, args)
- Handles TOPIC changes.
- handle_version(self, numeric, command, args)
- Handles requests for the PyLink server version.
- handle_whois(self, numeric, command, args)
- Handles incoming WHOIS requests.
- invite(self, numeric, target, channel)
- Sends INVITEs from a PyLink client.
- join(self, client, channel)
- Joins a PyLink client to a channel.
- kick(self, numeric, channel, target, reason=None)
- Sends kicks from a PyLink client/server.
- kill(self, numeric, target, reason)
- Sends a kill from a PyLink client/server.
- knock(self, numeric, target, text)
- message(self, numeric, target, text)
- Sends a PRIVMSG from a PyLink client.
- mode(self, numeric, target, modes, ts=None)
- Sends mode changes from a PyLink client/server.
- 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. This is used for WHOIS
replies.
- part(self, client, channel, reason=None)
- Sends a part from a PyLink client.
- 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.
- quit(self, numeric, reason)
- Quits a PyLink client.
- 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='IRC Operator', manipulatable=False)
- Spawns a new client with the given options.
Note: No nick collision / valid nickname checks are done here; it is
up to plugins to make sure they don't introduce anything invalid.
- 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.
- topicBurst(self, numeric, target, text)
- Sends a TOPIC change from a PyLink server.
- updateClient(self, target, field, text)
- Updates the ident or host of any connected client.
Static methods defined here:
- decode_p10_ip(ip)
- Decodes a P10 IP.
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 P10SIDGenerator(builtins.object) |
| |
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- next_sid(self)
- Returns the next available SID.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|