Should fix bug #1029954.

This commit is contained in:
Jeremy Fincher 2004-09-30 08:31:27 +00:00
parent 3566b12b29
commit 6c36941f7c

View File

@ -222,6 +222,9 @@ class Enforcer(callbacks.Privmsg):
chanserv = self.registryValue('ChanServ') chanserv = self.registryValue('ChanServ')
if ircutils.strEqual(nick, chanserv): if ircutils.strEqual(nick, chanserv):
return True # It's ChanServ. return True # It's ChanServ.
return False
def _isOp(self, irc, channel, hostmask):
capability = _chanCap(channel, 'op') capability = _chanCap(channel, 'op')
if ircdb.checkCapability(hostmask, capability): if ircdb.checkCapability(hostmask, capability):
return True # It's a chanop. return True # It's a chanop.
@ -230,7 +233,9 @@ class Enforcer(callbacks.Privmsg):
def _revenge(self, irc, channel, hostmask): def _revenge(self, irc, channel, hostmask):
nick = ircutils.nickFromHostmask(hostmask) nick = ircutils.nickFromHostmask(hostmask)
if self.registryValue('takeRevenge', channel): if self.registryValue('takeRevenge', channel):
if self._isPowerful(irc, channel, hostmask) and \ if self._isPowerful(irc, channel, hostmask):
return
if self._isOp(irc, channel, hostmask) and \
not self.registryValue('takeRevenge.onOps', channel): not self.registryValue('takeRevenge.onOps', channel):
return return
if not ircutils.strEqual(irc.nick, nick): if not ircutils.strEqual(irc.nick, nick):
@ -263,7 +268,6 @@ class Enforcer(callbacks.Privmsg):
if not ircutils.isChannel(channel): if not ircutils.isChannel(channel):
return return
if self._isPowerful(irc, channel, msg.prefix): if self._isPowerful(irc, channel, msg.prefix):
if not self.registryValue('takeRevenge.onOps', channel):
return return
for (mode, value) in ircutils.separateModes(msg.args[1:]): for (mode, value) in ircutils.separateModes(msg.args[1:]):
if not isinstance(value, basestring): if not isinstance(value, basestring):