From 2169a9be28331c6207865d50912cd671ff3c34a2 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 26 Mar 2016 17:58:03 -0700 Subject: [PATCH] utils: actually abort when mode target is invalid --- utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.py b/utils.py index 7a13df7..c7b1a95 100644 --- a/utils.py +++ b/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