From f51a882d23831b85fa1949b222d1fc9ec3d4b5ae Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 17 Jul 2016 10:48:51 -0700 Subject: [PATCH] exttargets: verify target is in channel before calling getPrefixModes --- coremods/exttargets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coremods/exttargets.py b/coremods/exttargets.py index 6531848..aa88a9c 100644 --- a/coremods/exttargets.py +++ b/coremods/exttargets.py @@ -123,7 +123,7 @@ def channel(irc, host, uid): return uid in irc.channels[channel].users elif len(groups) >= 3: # For things like #channel:op, check if the query is in the user's prefix modes. - return groups[2].lower() in irc.channels[channel].getPrefixModes(uid) + return (uid in irc.channels[channel].users) and (groups[2].lower() in irc.channels[channel].getPrefixModes(uid)) @bind def pylinkacc(irc, host, uid):