mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
utils: actually abort when mode target is invalid
This commit is contained in:
parent
9cd1635f68
commit
2169a9be28
2
utils.py
2
utils.py
@ -203,6 +203,7 @@ def parseModes(irc, target, args):
|
||||
|
||||
if target not in irc.users:
|
||||
log.warning('(%s) Possible desync! Mode target %s is not in the users index.', irc.name, target)
|
||||
return [] # Return an empty mode list
|
||||
|
||||
supported_modes = irc.umodes
|
||||
oldmodes = irc.users[target].modes
|
||||
@ -211,6 +212,7 @@ def parseModes(irc, target, args):
|
||||
|
||||
if target not in irc.channels:
|
||||
log.warning('(%s) Possible desync! Mode target %s is not in the channels index.', irc.name, target)
|
||||
return []
|
||||
|
||||
supported_modes = irc.cmodes
|
||||
oldmodes = irc.channels[target].modes
|
||||
|
Loading…
Reference in New Issue
Block a user