3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

protocols: squitServer(...) -> squit(...)

This commit is contained in:
James Lu 2016-01-16 16:53:06 -08:00
parent 5324475d18
commit 9a61e64dfc
4 changed files with 5 additions and 5 deletions

View File

@ -81,7 +81,7 @@ optional, and defaults to the one we've stored in the channel state if not given
- **`spawnServer`**`(self, name, sid=None, uplink=None, desc=None)` - Spawns a server off another 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. Sanity checks for server name and SID validity ARE done by the protocol module here. - **`spawnServer`**`(self, name, sid=None, uplink=None, desc=None)` - Spawns a server off another 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. Sanity checks for server name and SID validity ARE done by the protocol module here.
- **`squitServer`**`(self, source, target, text='No reason given')` - SQUITs a PyLink server. - **`squit`**`(self, source, target, text='No reason given')` - SQUITs a PyLink server.
- **`topicClient`**`(self, source, target, text)` - Sends a topic change from a PyLink client. - **`topicClient`**`(self, source, target, text)` - Sends a topic change from a PyLink client.

View File

@ -64,7 +64,7 @@ def die(sourceirc):
irc.proto.quit(user, "Relay plugin unloaded.") irc.proto.quit(user, "Relay plugin unloaded.")
for server, sobj in irc.servers.copy().items(): for server, sobj in irc.servers.copy().items():
if hasattr(sobj, 'remote'): if hasattr(sobj, 'remote'):
irc.proto.squitServer(irc.sid, server, text="Relay plugin unloaded.") irc.proto.squit(irc.sid, server, text="Relay plugin unloaded.")
relayservers.clear() relayservers.clear()
relayusers.clear() relayusers.clear()
@ -1057,7 +1057,7 @@ def handle_disconnect(irc, numeric, command, args):
except KeyError: except KeyError:
continue continue
else: else:
ircobj.proto.squitServer(ircobj.sid, rsid, text='Relay network lost connection.') ircobj.proto.squit(ircobj.sid, rsid, text='Relay network lost connection.')
del relayservers[name][irc.name] del relayservers[name][irc.name]
try: try:
del relayservers[irc.name] del relayservers[irc.name]

View File

@ -336,7 +336,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
endburstf() endburstf()
return sid return sid
def squitServer(self, source, target, text='No reason given'): def squit(self, source, target, text='No reason given'):
"""SQUITs a PyLink server.""" """SQUITs a PyLink server."""
# -> :9PY SQUIT 9PZ :blah, blah # -> :9PY SQUIT 9PZ :blah, blah
self._send(source, 'SQUIT %s :%s' % (target, text)) self._send(source, 'SQUIT %s :%s' % (target, text))

View File

@ -141,7 +141,7 @@ class TS6BaseProtocol(Protocol):
self.irc.servers[sid] = IrcServer(uplink, name, internal=True, desc=desc) self.irc.servers[sid] = IrcServer(uplink, name, internal=True, desc=desc)
return sid return sid
def squitServer(self, source, target, text='No reason given'): def squit(self, source, target, text='No reason given'):
"""SQUITs a PyLink server.""" """SQUITs a PyLink server."""
# -> SQUIT 9PZ :blah, blah # -> SQUIT 9PZ :blah, blah
log.debug('source=%s, target=%s', source, target) log.debug('source=%s, target=%s', source, target)