| |
- builtins.object
-
- TS6SIDGenerator
- classes.Protocol(builtins.object)
-
- TS6BaseProtocol
- utils.IncrementalUIDGenerator(builtins.object)
-
- TS6UIDGenerator
class TS6BaseProtocol(classes.Protocol) |
|
Base Protocol module class for PyLink. |
|
- Method resolution order:
- TS6BaseProtocol
- 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.
- 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)
- 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 TS6SIDGenerator(builtins.object) |
|
TS6 SID Generator. <query> is a 3 character string with any combination of
uppercase letters, digits, and #'s. it must contain at least one #,
which are used by the generator as a wildcard. On every next_sid() call,
the first available wildcard character (from the right) will be
incremented to generate the next SID.
When there are no more available SIDs left (SIDs are not reused, only
incremented), RuntimeError is raised.
Example queries:
"1#A" would give: 10A, 11A, 12A ... 19A, 1AA, 1BA ... 1ZA (36 total results)
"#BQ" would give: 0BQ, 1BQ, 2BQ ... 9BQ (10 total results)
"6##" would give: 600, 601, 602, ... 60Y, 60Z, 610, 611, ... 6ZZ (1296 total results) |
|
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- increment(self, pos=2)
- Increments the SID generator to the next available SID.
- next_sid(self)
- Returns the next unused TS6 SID for the server.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|