mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
Irc: warn when applyModes target doesn't exist
This can happen when a network disconnects while spawnClient is setting modes on a newly spawned client, for example...
This commit is contained in:
parent
5ef135d888
commit
f8ca65cabc
11
classes.py
11
classes.py
@ -644,10 +644,13 @@ class Irc():
|
||||
else:
|
||||
modelist.discard(real_mode)
|
||||
log.debug('(%s) Final modelist: %s', self.name, modelist)
|
||||
if usermodes:
|
||||
self.users[target].modes = modelist
|
||||
else:
|
||||
self.channels[target].modes = modelist
|
||||
try:
|
||||
if usermodes:
|
||||
self.users[target].modes = modelist
|
||||
else:
|
||||
self.channels[target].modes = modelist
|
||||
except KeyError:
|
||||
log.warning("(%s) Invalid MODE target %s (usermodes=%s)", self.name, target, usermodes)
|
||||
|
||||
@staticmethod
|
||||
def _flip(mode):
|
||||
|
Loading…
Reference in New Issue
Block a user