mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-04-27 05:21:10 -05:00
fixs and added support for -capability protections
This commit is contained in:
parent
02f23df444
commit
7a4ff48863
@ -1048,7 +1048,7 @@ class Chan (object):
|
|||||||
c.execute("""DELETE FROM patterns WHERE id=? and channel=? LIMIT 1""",(uid,self.name))
|
c.execute("""DELETE FROM patterns WHERE id=? and channel=? LIMIT 1""",(uid,self.name))
|
||||||
if uid in self.patterns:
|
if uid in self.patterns:
|
||||||
del self.patterns[uid]
|
del self.patterns[uid]
|
||||||
prop = 'Pattern%s' % pattern.uid
|
prop = 'Pattern%s' % id
|
||||||
if prop in self.spam:
|
if prop in self.spam:
|
||||||
del self.spam[prop]
|
del self.spam[prop]
|
||||||
db.commit()
|
db.commit()
|
||||||
@ -3681,6 +3681,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
limit = self.registryValue('%sPermit' % prop,channel=channel)
|
limit = self.registryValue('%sPermit' % prop,channel=channel)
|
||||||
if limit < 0:
|
if limit < 0:
|
||||||
return False
|
return False
|
||||||
|
flag = ircdb.makeChannelCapability(channel, prop)
|
||||||
|
if not ircdb.checkCapability(key, flag):
|
||||||
|
return False
|
||||||
chan = self.getChan(irc,channel)
|
chan = self.getChan(irc,channel)
|
||||||
life = self.registryValue('%sLife' % prop,channel=channel)
|
life = self.registryValue('%sLife' % prop,channel=channel)
|
||||||
if not prop in chan.spam:
|
if not prop in chan.spam:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user