From 905a13e70cc76cfea645bbb60d53e1c62a324107 Mon Sep 17 00:00:00 2001 From: Nicolas Coevoet Date: Tue, 17 Dec 2013 10:15:19 +0100 Subject: [PATCH] added Channel.ban supports in order to ban on join blacklist hostmask --- plugin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 7a14719..823eea3 100644 --- a/plugin.py +++ b/plugin.py @@ -1898,7 +1898,14 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler): chan = self.getChan(irc,channel) chan.nicks[msg.nick] = True n.addLog(channel,'has joined') - if best and not self._isVip(irc,channel,n): + c = ircdb.channels.getChannel(channel) + banned = False + if c.bans: + for ban in c.bans: + if match (ban,n): + i.add(irc,channel,'b',best,-1,irc.prefix,self.getDb(irc.network)) + banned = True + if best and not self._isVip(irc,channel,n) and not banned: isMassJoin = self._isSomething(irc,channel,channel,'massJoin') if isMassJoin: chan.action.enqueue(ircmsgs.IrcMsg('MODE %s %s' % (channel,self.registryValue('massJoinMode',channel=channel))))