This commit is contained in:
Nicolas Coevoet 2014-04-26 20:53:19 +02:00
commit 535a86cdfa

View File

@ -1743,6 +1743,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
# chan.syn is necessary, otherwise, bot can't call owner if rights missed ( see doNotice )
if not self.registryValue('doNothingAboutOwnOpStatus',channel=channel):
chan.opAsked = True
def f ():
chan.opAsked = False
schedule.addEvent(f,time.time() + 300)
irc.queueMsg(ircmsgs.IrcMsg(self.registryValue('opCommand',channel=channel).replace('$channel',channel).replace('$nick',irc.nick)))
retickle = True
if len(chan.queue) or len(chan.action):
@ -1751,6 +1754,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
if not chan.deopAsked:
if not self.registryValue('doNothingAboutOwnOpStatus',channel=channel):
chan.opAsked = True
def f ():
chan.opAsked = False
schedule.addEvent(f,time.time() + 300)
irc.queueMsg(ircmsgs.IrcMsg(self.registryValue('opCommand',channel=channel).replace('$channel',channel).replace('$nick',irc.nick)))
retickle = True
elif irc.nick in irc.state.channels[channel].ops: