fix condition, don't warn ops for every factoid.

This commit is contained in:
Elián Hanisch
2010-06-30 13:32:17 -03:00
parent c1a9f140f2
commit 9c990ac7e6

View File

@ -523,7 +523,7 @@ class Encyclopedia(callbacks.Plugin):
return
# check if retmsg has urls (possible spam)
if checkUrl(retmsg):
if self.alert and target[0] == '#' and not target.endswith('bots'):
if self.alert and (target[0] == '#' and not target.endswith('bots')):
# !ops factoid called with an url, most likely spam.
# we filter the msg, but we still warn in -ops.
queue(irc, self.registryValue('relayChannel', channel), '%s called the ops in %s (%s)' % (msg.nick, msg.args[0], retmsg[:-2]))