3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

exttargets: verify target is in channel before calling getPrefixModes

This commit is contained in:
James Lu 2016-07-17 10:48:51 -07:00
parent 8e1e92c564
commit f51a882d23

View File

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