mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-04-30 07:21:12 -05:00
modified a bit bot's deop, to prevent useless wait on unban/quiets/etc
This commit is contained in:
parent
897746487d
commit
3e64e12ded
11
plugin.py
11
plugin.py
@ -1705,13 +1705,24 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
if not chan.deopAsked:
|
if not chan.deopAsked:
|
||||||
if len(chan.queue):
|
if len(chan.queue):
|
||||||
L = []
|
L = []
|
||||||
|
index = 0
|
||||||
|
adding = False
|
||||||
while len(chan.queue):
|
while len(chan.queue):
|
||||||
L.append(chan.queue.pop())
|
L.append(chan.queue.pop())
|
||||||
|
if L[index][0].find ('+') != -1:
|
||||||
|
adding = True
|
||||||
|
index = index + 1
|
||||||
# remove duplicates ( should not happens but .. )
|
# remove duplicates ( should not happens but .. )
|
||||||
S = set(L)
|
S = set(L)
|
||||||
r = []
|
r = []
|
||||||
for item in L:
|
for item in L:
|
||||||
r.append(item)
|
r.append(item)
|
||||||
|
# if glich, just comment this if...
|
||||||
|
if not len(chan.action) and not adding:
|
||||||
|
if not self.registryValue('keepOp',channel=channel) and not self.registryValue('doNothingAboutOwnOpStatus',channel=channel):
|
||||||
|
chan.deopPending = True
|
||||||
|
chan.deopAsked = True
|
||||||
|
r.append(('-o',irc.nick))
|
||||||
if len(r):
|
if len(r):
|
||||||
# create IrcMsg
|
# create IrcMsg
|
||||||
self._sendModes(irc,r,f)
|
self._sendModes(irc,r,f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user