From 61cafe944971729ce3a63b476bd9e881ce63ecc4 Mon Sep 17 00:00:00 2001 From: Nicolas Coevoet Date: Fri, 20 Dec 2013 20:04:44 +0100 Subject: [PATCH] added protected capability from supybot to prevent bot to do channel protection against, resolves #2 --- plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 73cabb5..c357b6a 100644 --- a/plugin.py +++ b/plugin.py @@ -2300,7 +2300,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler): self._tickle(irc) def _isVip (self,irc,channel,n): - + protected = ircdb.makeChannelCapability(channel, 'protected') + if ircdb.checkCapability(n.prefix, protected): + return True chan = self.getChan(irc,channel) ignoresModes = self.registryValue('modesToAskWhenOpped',channel=channel) vip = False