mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
relay: remove dead networks' servers from the servers index unconditionally
For #183.
This commit is contained in:
parent
a4395ed989
commit
46922ce879
@ -1192,12 +1192,17 @@ def handle_disconnect(irc, numeric, command, args):
|
||||
for name, ircobj in world.networkobjects.copy().items():
|
||||
if name != irc.name and ircobj.connected.is_set():
|
||||
try:
|
||||
rsid = relayservers[ircobj.name][irc.name]
|
||||
rsid = relayservers[name][irc.name]
|
||||
except KeyError:
|
||||
continue
|
||||
else:
|
||||
ircobj.proto.squit(ircobj.sid, rsid, text='Relay network lost connection.')
|
||||
del relayservers[name][irc.name]
|
||||
|
||||
try:
|
||||
del relayservers[name][irc.name]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
del relayservers[irc.name]
|
||||
except KeyError:
|
||||
|
Loading…
Reference in New Issue
Block a user