Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
resolve #15
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoevoet committed Nov 24, 2017
1 parent 6571199 commit 8a5d024
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ def configure(advanced):
# can be per channel's settings
conf.registerChannelValue(Sigyn, 'ignoreChannel',
registry.Boolean(False, """ignore everything in the channel"""))
conf.registerChannelValue(Sigyn, 'ignoreVoicedUser',
registry.Boolean(False, """ignore voiced users in the channel"""))

conf.registerChannelValue(Sigyn, 'ignoreDuration',
registry.Integer(-1, """in secondes: if -1 disabled, otherwise bot ignores user's privmsg/notices after <seconds> in channel"""))

Expand Down
6 changes: 5 additions & 1 deletion plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,8 @@ def do311 (self,irc,msg):
del i.mx[nick]
mask = self.prefixToMask(irc,hostmask)
self.logChannel(irc,'SERVICE: %s registered %s with *@%s is in mxbl --> %s' % (hostmask,nick,email,mask))
self.kline(irc,hostmask,mask,self.registryValue('klineDuration'),'register abuses (%s) !dnsbl' % email)
if i.defcon:
self.kline(irc,hostmask,mask,self.registryValue('klineDuration'),'register abuses (%s)' % email)
if badmail:
irc.queueMsg(ircmsgs.IrcMsg('PRIVMSG NickServ :BADMAIL ADD *@%s %s' % (email,mx)))
irc.queueMsg(ircmsgs.IrcMsg('PRIVMSG NickServ :FDROP %s' % nick))
Expand Down Expand Up @@ -1615,6 +1616,9 @@ def handleMsg (self,irc,msg,isNotice):
if irc.nick in raw:
self.logChannel(irc,'OP: [%s] <%s> %s' % (channel,msg.nick,text))
continue
if self.registryValue('ignoreVoicedUser',channel=channel):
if msg.nick in list(irc.state.channels[channel].voices):
continue
protected = ircdb.makeChannelCapability(channel, 'protected')
if ircdb.checkCapability(msg.prefix, protected):
continue
Expand Down

0 comments on commit 8a5d024

Please sign in to comment.