| |
- ts6_common.TS6BaseProtocol(classes.Protocol)
-
- UnrealProtocol
Class = class UnrealProtocol(ts6_common.TS6BaseProtocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- UnrealProtocol
- ts6_common.TS6BaseProtocol
- classes.Protocol
- builtins.object
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- checkCloakChange(self, uid, parsedmodes)
- Checks whether +x/-x was set in the mode query, and changes the
hostname of the user given to or from their cloaked host if True.
- connect(self)
- Initializes a connection to a server.
- handle_chghost(self, numeric, command, args)
- Handles CHGHOST, used for denoting hostname changes.
- handle_chgident(self, numeric, command, args)
- Handles CHGIDENT, used for denoting ident changes.
- handle_chgname(self, numeric, command, args)
- Handles CHGNAME, used for denoting real name/gecos changes.
- handle_eos(self, numeric, command, args)
- EOS is used to denote end of burst.
- handle_invite(self, numeric, command, args)
- Handles incoming INVITEs.
- handle_join(self, numeric, command, args)
- Handles the UnrealIRCd JOIN command.
- handle_kill(self, numeric, command, args)
- Handles incoming KILLs.
- handle_mode(self, numeric, command, args)
- handle_nick(self, numeric, command, args)
- Handles NICK changes, and legacy NICK introductions from pre-4.0 servers.
- handle_notice = handle_privmsg(self, source, command, args)
- handle_pass(self, numeric, command, args)
- handle_ping(self, numeric, command, args)
- handle_pong(self, source, command, args)
- handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_protoctl(self, numeric, command, args)
- Handles protocol negotiation.
- handle_server(self, numeric, command, args)
- Handles the SERVER command, which is used for both authentication and
introducing legacy (non-SID) servers.
- handle_sethost(self, numeric, command, args)
- Handles CHGHOST, used for self hostname changes.
- handle_setident(self, numeric, command, args)
- Handles SETIDENT, used for self ident changes.
- handle_setname(self, numeric, command, args)
- Handles SETNAME, used for self real name/gecos changes.
- handle_sid(self, numeric, command, args)
- Handles the SID command, used for introducing remote servers by our uplink.
- handle_sjoin(self, numeric, command, args)
- Handles the UnrealIRCd SJOIN command.
- handle_squit(self, numeric, command, args)
- Handles the SQUIT command.
- handle_svs2mode(self, sender, command, args)
- Handles SVS2MODE, which sets services login information, and user modes on
the given target.
- handle_svsmode(self, numeric, command, args)
- Handles SVSMODE, used by services for setting user modes on others.
- handle_topic(self, numeric, command, args)
- Handles the TOPIC command.
- handle_uid(self, numeric, command, args)
- handle_umode2(self, numeric, command, args)
- Handles UMODE2, used to set user modes on oneself.
- handle_whois(self, numeric, command, args)
- Handles WHOIS queries.
- 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. The mode list should be
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.
- 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 (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)])
Note that for UnrealIRCd, no mode data is sent in an SJOIN command, only
The channel name, TS, and user list.
- 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.
- topicBurst(self, numeric, target, text)
- Sends a TOPIC change from a PyLink server.
- updateClient(self, target, field, text)
- Updates the ident, host, or realname 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_part(self, source, command, args)
- Handles incoming PART commands.
- 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_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 UnrealProtocol(ts6_common.TS6BaseProtocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- UnrealProtocol
- ts6_common.TS6BaseProtocol
- classes.Protocol
- builtins.object
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- checkCloakChange(self, uid, parsedmodes)
- Checks whether +x/-x was set in the mode query, and changes the
hostname of the user given to or from their cloaked host if True.
- connect(self)
- Initializes a connection to a server.
- handle_chghost(self, numeric, command, args)
- Handles CHGHOST, used for denoting hostname changes.
- handle_chgident(self, numeric, command, args)
- Handles CHGIDENT, used for denoting ident changes.
- handle_chgname(self, numeric, command, args)
- Handles CHGNAME, used for denoting real name/gecos changes.
- handle_eos(self, numeric, command, args)
- EOS is used to denote end of burst.
- handle_invite(self, numeric, command, args)
- Handles incoming INVITEs.
- handle_join(self, numeric, command, args)
- Handles the UnrealIRCd JOIN command.
- handle_kill(self, numeric, command, args)
- Handles incoming KILLs.
- handle_mode(self, numeric, command, args)
- handle_nick(self, numeric, command, args)
- Handles NICK changes, and legacy NICK introductions from pre-4.0 servers.
- handle_notice = handle_privmsg(self, source, command, args)
- handle_pass(self, numeric, command, args)
- handle_ping(self, numeric, command, args)
- handle_pong(self, source, command, args)
- handle_privmsg(self, source, command, args)
- Handles incoming PRIVMSG/NOTICE.
- handle_protoctl(self, numeric, command, args)
- Handles protocol negotiation.
- handle_server(self, numeric, command, args)
- Handles the SERVER command, which is used for both authentication and
introducing legacy (non-SID) servers.
- handle_sethost(self, numeric, command, args)
- Handles CHGHOST, used for self hostname changes.
- handle_setident(self, numeric, command, args)
- Handles SETIDENT, used for self ident changes.
- handle_setname(self, numeric, command, args)
- Handles SETNAME, used for self real name/gecos changes.
- handle_sid(self, numeric, command, args)
- Handles the SID command, used for introducing remote servers by our uplink.
- handle_sjoin(self, numeric, command, args)
- Handles the UnrealIRCd SJOIN command.
- handle_squit(self, numeric, command, args)
- Handles the SQUIT command.
- handle_svs2mode(self, sender, command, args)
- Handles SVS2MODE, which sets services login information, and user modes on
the given target.
- handle_svsmode(self, numeric, command, args)
- Handles SVSMODE, used by services for setting user modes on others.
- handle_topic(self, numeric, command, args)
- Handles the TOPIC command.
- handle_uid(self, numeric, command, args)
- handle_umode2(self, numeric, command, args)
- Handles UMODE2, used to set user modes on oneself.
- handle_whois(self, numeric, command, args)
- Handles WHOIS queries.
- 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. The mode list should be
a list of (mode, arg) tuples, i.e. the format of utils.parseModes() output.
- 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 (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)])
Note that for UnrealIRCd, no mode data is sent in an SJOIN command, only
The channel name, TS, and user list.
- 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.
- topicBurst(self, numeric, target, text)
- Sends a TOPIC change from a PyLink server.
- updateClient(self, target, field, text)
- Updates the ident, host, or realname 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_part(self, source, command, args)
- Handles incoming PART commands.
- 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_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)
| |