diff --git a/config.py b/config.py index 56aea2e..78cf0ea 100644 --- a/config.py +++ b/config.py @@ -71,6 +71,9 @@ conf.registerChannelValue(ChanTracker, 'avoidOverlap', conf.registerChannelValue(ChanTracker, 'useIpForGateway', registry.Boolean(False, """use *!*@*ip bans instead of *!ident@gateway/* when gateways cloak is found and ends with ip.*""")) +conf.registerChannelValue(ChanTracker, 'triggerOps', + registry.Boolean(False, """!ops triggers a message in logChannel""")) + conf.registerChannelValue(ChanTracker, 'opCommand', registry.String("PRIVMSG ChanServ :OP $channel $nick", """command used to obtain channel operator mode"""), opSettable=False) diff --git a/plugin.py b/plugin.py index de195e5..ba935f9 100644 --- a/plugin.py +++ b/plugin.py @@ -1801,6 +1801,21 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler): self._tickle(irc) overlap = wrap(overlap,['op','text']) + def ops (self,irc,msg,args,channel,text): + """[] + + triggers ops in the operators channels""" + if not self.registryValue('triggerOps',channel=channel): + return + if not text: + text = '' + schannel = channel + if self.registryValue('useColorForAnnounces',channel=channel): + schannel = ircutils.bold(channel) + self._logChan(irc,channel,"[%s] %s wants attention from ops (%s)" % (channel,msg.prefix,text)) + ops = wrap(ops,['channel',optional('text')]) + + def match (self,irc,msg,args,channel,prefix): """[] @@ -2743,7 +2758,8 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler): chan.action.enqueue(ircmsgs.IrcMsg('MODE %s %s' % (channel,self.registryValue('massJoinUnMode',channel=channel)))) schedule.addEvent(unAttack,float(time.time()+self.registryValue('massJoinDuration',channel=channel))) self.forceTickle = True - if not banned: + flag = ircdb.makeChannelCapability(channel,'clone') + if not banned and ircdb.checkCapability(msg.prefix,flag): permit = self.registryValue('clonePermit',channel=channel) if permit > -1: clones = []