reset the op status if the bot cycles the channel
This commit is contained in:
@ -1077,6 +1077,8 @@ class Bantracker(callbacks.Plugin):
|
||||
self.doLog(irc, channel,
|
||||
'*** %s has joined %s\n' % (msg.prefix, channel))
|
||||
if msg.nick == irc.nick:
|
||||
if channel in self.opped:
|
||||
del self.opped[channel]
|
||||
if channel in self.bans:
|
||||
del self.bans[channel]
|
||||
queue.queue(ircmsgs.mode(channel, 'b'))
|
||||
|
@ -576,6 +576,12 @@ class BantrackerTestCase(ChannelPluginTestCase):
|
||||
self.assertEqual(cb.opped['#test'], True)
|
||||
self.deop()
|
||||
self.assertEqual(cb.opped['#test'], False)
|
||||
self.op()
|
||||
self.irc.feedMsg(ircmsgs.part('#test', prefix=self.prefix))
|
||||
self.irc.feedMsg(ircmsgs.join('#test', prefix=self.prefix))
|
||||
self.irc.takeMsg() # MODE msg
|
||||
self.irc.takeMsg() # WHO msg
|
||||
self.assertEqual(cb.opped['#test'], False)
|
||||
|
||||
def testOpDuration(self):
|
||||
cb = self.getCallback()
|
||||
|
Reference in New Issue
Block a user