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):