mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-26 04:51:06 -05:00
Use the hostmask argument isProtected is given instead of trying to use a non-existant variable.
This commit is contained in:
parent
74e06ea52a
commit
b24eedf596
@ -58,7 +58,7 @@ class Protector(callbacks.Plugin):
|
|||||||
|
|
||||||
def isProtected(self, irc, channel, hostmask):
|
def isProtected(self, irc, channel, hostmask):
|
||||||
cap = ircdb.makeChannelCapability(channel, 'protected')
|
cap = ircdb.makeChannelCapability(channel, 'protected')
|
||||||
if ircdb.checkCapability(msg.prefix, cap):
|
if ircdb.checkCapability(hostmask, cap):
|
||||||
self.log.debug('%s is protected on %s, it has %s.',
|
self.log.debug('%s is protected on %s, it has %s.',
|
||||||
hostmask, channel, cap)
|
hostmask, channel, cap)
|
||||||
return True
|
return True
|
||||||
@ -68,7 +68,7 @@ class Protector(callbacks.Plugin):
|
|||||||
|
|
||||||
def demote(self, channel, nick):
|
def demote(self, channel, nick):
|
||||||
irc.queueMsg(ircmsgs.deop(channel, nick))
|
irc.queueMsg(ircmsgs.deop(channel, nick))
|
||||||
|
|
||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
def ignore(reason):
|
def ignore(reason):
|
||||||
self.log.debug('Ignoring %q, %s.', msg, reason)
|
self.log.debug('Ignoring %q, %s.', msg, reason)
|
||||||
@ -145,7 +145,7 @@ class Protector(callbacks.Plugin):
|
|||||||
protected.append(nick)
|
protected.append(nick)
|
||||||
if not self.isOp(irc, channel, msg.prefix):
|
if not self.isOp(irc, channel, msg.prefix):
|
||||||
self.demote(channel, msg.nick)
|
self.demote(channel, msg.nick)
|
||||||
|
|
||||||
|
|
||||||
Class = Protector
|
Class = Protector
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user