revert previous commit and really fix the notification message when opping fails.

This commit is contained in:
Elián Hanisch 2012-09-06 21:05:27 -03:00
parent 48f382917b
commit a1405ef034

View File

@ -906,12 +906,10 @@ class Bantracker(callbacks.Plugin):
del self.pendingReviews[None]
def getOp(self, irc, channel):
name = 'Bantracker_getop_%s' % channel
# check if we aren't already waiting for op
if name not in schedule.schedule.events:
msg = ircmsgs.privmsg('Chanserv', "op %s %s" % (channel, irc.nick))
irc.queueMsg(msg)
schedule.addEvent(lambda: self._getOpFail(irc, channel), 60, name)
msg = ircmsgs.privmsg('Chanserv', "op %s %s" % (channel, irc.nick))
irc.queueMsg(msg)
schedule.addEvent(lambda: self._getOpFail(irc, channel), time.time() + 60,
'Bantracker_getop_%s' % channel)
def _getOpFail(self, irc, channel):
for c in self.registryValue('autoremove.notify.channels', channel):