| |
- builtins.Exception(builtins.BaseException)
-
- ProtocolError
- builtins.object
-
- Irc
-
- FakeIRC
- IrcChannel
- IrcServer
- IrcUser
- Protocol
-
- FakeProto
class FakeIRC(Irc) |
|
Fake IRC object used for unit tests. |
|
- Method resolution order:
- FakeIRC
- Irc
- builtins.object
Methods defined here:
- connect(self)
- run(self, data)
- Queues a message to the fake IRC server.
- send(self, data)
- takeCommands(self, msgs)
- Returns a list of commands parsed from the output of takeMsgs().
- takeHooks(self)
- Returns a list of hook arguments sent by the protocol module since
the last takeHooks() call.
- takeMsgs(self)
- Returns a list of messages sent by the protocol module since
the last takeMsgs() call, so we can track what has been sent.
Methods inherited from Irc:
- __init__(self, netname, proto, conf)
- Initializes an IRC object. This takes 3 variables: the network name
(a string), the name of the protocol module to use for this connection,
and a configuration object.
- __repr__(self)
- callCommand(self, source, text)
- Calls a PyLink bot command. source is the caller's UID, and text is the
full, unparsed text of the message.
- callHooks(self, hook_args)
- Calls a hook function with the given hook args.
- disconnect(self)
- Closes the IRC connection.
- initVars(self)
- (Re)sets an IRC object to its default state. This should be called when
an IRC object is first created, and on every reconnection to a network.
- msg(self, target, text, notice=False, source=None)
- Handy function to send messages/notices to clients. Source
is optional, and defaults to the main PyLink client if not specified.
- reply(self, text, notice=False, source=None)
- Replies to the last caller in the right context (channel or PM).
- runline(self, line)
- Sends a command to the protocol module.
- schedulePing(self)
- Schedules periodic pings in a loop.
- spawnMain(self)
- Spawns the main PyLink client.
Data descriptors inherited from Irc:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class FakeProto(Protocol) |
|
Dummy protocol module for testing purposes. |
|
- Method resolution order:
- FakeProto
- Protocol
- builtins.object
Methods defined here:
- connect(self)
- handle_events(self, data)
- joinClient(self, client, channel)
- spawnClient(self, nick, *args, **kwargs)
Data and other attributes defined here:
- Class = <class 'classes.FakeProto'>
- Dummy protocol module for testing purposes.
Methods inherited from Protocol:
- __init__(self, irc)
- # TODO: Future state-keeping things will go here
- 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 Protocol:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Irc(builtins.object) |
|
Base IRC object for PyLink. |
|
Methods defined here:
- __init__(self, netname, proto, conf)
- Initializes an IRC object. This takes 3 variables: the network name
(a string), the name of the protocol module to use for this connection,
and a configuration object.
- __repr__(self)
- callCommand(self, source, text)
- Calls a PyLink bot command. source is the caller's UID, and text is the
full, unparsed text of the message.
- callHooks(self, hook_args)
- Calls a hook function with the given hook args.
- connect(self)
- Runs the connect loop for the IRC object. This is usually called by
__init__ in a separate thread to allow multiple concurrent connections.
- disconnect(self)
- Closes the IRC connection.
- initVars(self)
- (Re)sets an IRC object to its default state. This should be called when
an IRC object is first created, and on every reconnection to a network.
- msg(self, target, text, notice=False, source=None)
- Handy function to send messages/notices to clients. Source
is optional, and defaults to the main PyLink client if not specified.
- reply(self, text, notice=False, source=None)
- Replies to the last caller in the right context (channel or PM).
- run(self)
- Main IRC loop which listens for messages.
- runline(self, line)
- Sends a command to the protocol module.
- schedulePing(self)
- Schedules periodic pings in a loop.
- send(self, data)
- Sends raw text to the uplink server.
- spawnMain(self)
- Spawns the main PyLink client.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class IrcChannel(builtins.object) |
|
PyLink IRC channel class. |
|
Methods defined here:
- __init__(self)
- __repr__(self)
- deepcopy(self)
- Returns a deep copy of the channel object.
- removeuser(self, target)
- Removes a user from a channel.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class IrcServer(builtins.object) |
|
PyLink IRC server class.
uplink: The SID of this IrcServer instance's uplink. This is set to None
for the main PyLink PseudoServer!
name: The name of the server.
internal: Whether the server is an internal PyLink PseudoServer. |
|
Methods defined here:
- __init__(self, uplink, name, internal=False, desc='(None given)')
- __repr__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class IrcUser(builtins.object) |
|
PyLink IRC user class. |
|
Methods defined here:
- __init__(self, nick, ts, uid, ident='null', host='null', realname='PyLink dummy client', realhost='null', ip='0.0.0.0', manipulatable=False)
- __repr__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Protocol(builtins.object) |
| |
Methods defined here:
- __init__(self, irc)
- # TODO: Future state-keeping things will go here
- 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 defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class ProtocolError(builtins.Exception) |
| |
- Method resolution order:
- ProtocolError
- builtins.Exception
- builtins.BaseException
- builtins.object
Data descriptors defined here:
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from builtins.Exception:
- __init__(self, /, *args, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
Methods inherited from builtins.BaseException:
- __delattr__(self, name, /)
- Implement delattr(self, name).
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __reduce__(...)
- __repr__(self, /)
- Return repr(self).
- __setattr__(self, name, value, /)
- Implement setattr(self, name, value).
- __setstate__(...)
- __str__(self, /)
- Return str(self).
- with_traceback(...)
- Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.
Data descriptors inherited from builtins.BaseException:
- __cause__
- exception cause
- __context__
- exception context
- __dict__
- __suppress_context__
- __traceback__
- args
| |