mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
ts6: fixes to SQUIT handling
This commit is contained in:
parent
8258923cdb
commit
1f0426d7ff
@ -288,7 +288,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
def squitServer(self, source, target, text='No reason given'):
|
def squitServer(self, source, target, text='No reason given'):
|
||||||
"""SQUITs a PyLink server."""
|
"""SQUITs a PyLink server."""
|
||||||
# -> SQUIT 9PZ :blah, blah
|
# -> SQUIT 9PZ :blah, blah
|
||||||
self.irc.send('SQUIT %s :%s' % (target, text))
|
self._send(source, 'SQUIT %s :%s' % (target, text))
|
||||||
self.handle_squit(source, 'SQUIT', [target, text])
|
self.handle_squit(source, 'SQUIT', [target, text])
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
@ -162,8 +162,10 @@ class TS6BaseProtocol(Protocol):
|
|||||||
# :70M SQUIT 1ML :Server quit by GL!gl@0::1
|
# :70M SQUIT 1ML :Server quit by GL!gl@0::1
|
||||||
split_server = args[0]
|
split_server = args[0]
|
||||||
affected_users = []
|
affected_users = []
|
||||||
log.info('(%s) Netsplit on server %s', self.irc.name, split_server)
|
log.debug('(%s) Splitting server %s (reason: %s)', self.irc.name, split_server, args[-1])
|
||||||
assert split_server in self.irc.servers, "Tried to split a server (%s) that didn't exist!" % split_server
|
if split_server not in self.irc.servers:
|
||||||
|
log.warning("(%s) Tried to split a server (%s) that didn't exist!", self.irc.name, split_server)
|
||||||
|
return
|
||||||
# Prevent RuntimeError: dictionary changed size during iteration
|
# Prevent RuntimeError: dictionary changed size during iteration
|
||||||
old_servers = self.irc.servers.copy()
|
old_servers = self.irc.servers.copy()
|
||||||
for sid, data in old_servers.items():
|
for sid, data in old_servers.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user