mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-04-27 13:31:10 -05:00
little change for kick on :bans
This commit is contained in:
parent
bf6e263e15
commit
cfa54dda59
10
plugin.py
10
plugin.py
@ -1960,7 +1960,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
for value in list(chan._lists[mode].keys()):
|
for value in list(chan._lists[mode].keys()):
|
||||||
item = chan._lists[mode][value]
|
item = chan._lists[mode][value]
|
||||||
if item.expire != None and item.expire != item.when and not item.asked and item.expire <= t:
|
if item.expire != None and item.expire != item.when and not item.asked and item.expire <= t:
|
||||||
if mode == 'q' and l == 1 and self.registryValue('useChanServForQuiets',channel=channel) and not irc.nick in irc.state.channels[channel].ops and not len(chan.queue):
|
if mode == 'q' and l == 1 and self.registryValue('useChanServForQuiets',channel=channel) and not irc.nick in irc.state.channels[channel].ops and len(chan.queue) == 1:
|
||||||
s = self.registryValue('unquietCommand')
|
s = self.registryValue('unquietCommand')
|
||||||
s = s.replace('$channel',channel)
|
s = s.replace('$channel',channel)
|
||||||
s = s.replace('$hostmask',item.value)
|
s = s.replace('$hostmask',item.value)
|
||||||
@ -2970,12 +2970,12 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
chan.deopPending = True
|
chan.deopPending = True
|
||||||
schedule.addEvent(unOpBot,float(time.time()+10))
|
schedule.addEvent(unOpBot,float(time.time()+10))
|
||||||
|
|
||||||
def hasExtendedSharedBan (self,irc,fromChannel,target):
|
def hasExtendedSharedBan (self,irc,fromChannel,target,mode):
|
||||||
# todo add support for others ircd if supported, currently only freenode
|
# todo add support for others ircd if supported, currently only freenode
|
||||||
b = '$j:%s' % fromChannel
|
b = '$j:%s' % fromChannel
|
||||||
kicks = []
|
kicks = []
|
||||||
for channel in irc.state.channels:
|
for channel in irc.state.channels:
|
||||||
if b in irc.state.channels[channel].bans and self.registryValue('doActionAgainstAffected',channel=channel):
|
if b in irc.state.channels[channel].bans and mode in self.registryValue('kickMode',channel=channel):
|
||||||
L = []
|
L = []
|
||||||
for nick in list(irc.state.channels[channel].users):
|
for nick in list(irc.state.channels[channel].users):
|
||||||
L.append(nick)
|
L.append(nick)
|
||||||
@ -3066,8 +3066,8 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
irc.queueMsg(ircmsgs.notice(nick,qm))
|
irc.queueMsg(ircmsgs.notice(nick,qm))
|
||||||
else:
|
else:
|
||||||
irc.queueMsg(ircmsgs.privmsg(nick,qm))
|
irc.queueMsg(ircmsgs.privmsg(nick,qm))
|
||||||
if m == 'b':
|
if m in self.registryValue('kickMode',channel=channel):
|
||||||
self.hasExtendedSharedBan(irc,channel,value)
|
self.hasExtendedSharedBan(irc,channel,value,m)
|
||||||
# bot just got op
|
# bot just got op
|
||||||
if m == 'o' and value == irc.nick:
|
if m == 'o' and value == irc.nick:
|
||||||
chan.opAsked = False
|
chan.opAsked = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user