Retarded, I put the inFilter in the LogProxy class rather than in the Owner class\!

This commit is contained in:
Jeremy Fincher 2004-08-21 20:34:29 +00:00
parent 3010885fca
commit 516d130f1e
1 changed files with 6 additions and 6 deletions

View File

@ -164,12 +164,6 @@ class LogProxy(object):
self.im_func = holder()
self.im_func.func_name = 'log'
def inFilter(self, irc, msg):
if msg.command == 'PRIVMSG' and msg.nick == irc.nick:
self.log.warning('Somehow sent a message to myself, ignoring.')
return None
return msg
def __call__(self, irc, msg, args):
text = privmsgs.getArgs(args)
log.critical(text)
@ -206,6 +200,12 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
continue
registerDefaultPlugin(name, s)
def inFilter(self, irc, msg):
if msg.command == 'PRIVMSG' and msg.nick == irc.nick:
self.log.warning('Somehow sent a message to myself, ignoring.')
return None
return msg
def isCommand(self, methodName):
return methodName == 'log' or \
privmsgs.CapabilityCheckingPrivmsg.isCommand(self, methodName)