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

relay: run getLocalUser BEFORE quitting the user (in removeChannel)

This prevents KeyErrors from showing up on DELINK.
This commit is contained in:
James Lu 2015-08-12 01:19:30 -07:00
parent 684eac9583
commit 14435f8f55

View File

@ -718,9 +718,9 @@ def removeChannel(irc, channel):
irc.proto.partClient(irc, user, channel, 'Channel delinked.') irc.proto.partClient(irc, user, channel, 'Channel delinked.')
# Don't ever quit it either... # Don't ever quit it either...
if user != irc.pseudoclient.uid and not irc.users[user].channels: if user != irc.pseudoclient.uid and not irc.users[user].channels:
irc.proto.quitClient(irc, user, 'Left all shared channels.')
remoteuser = getLocalUser(irc, user) remoteuser = getLocalUser(irc, user)
del relayusers[remoteuser][irc.name] del relayusers[remoteuser][irc.name]
irc.proto.quitClient(irc, user, 'Left all shared channels.')
@utils.add_cmd @utils.add_cmd
def create(irc, source, args): def create(irc, source, args):