mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +01:00
Converted to an outFilter for greater efficiency (why send a message to myself at all?) and added a check for testing, because otherwise the tests break.
This commit is contained in:
parent
17c569ba2c
commit
98062e8844
@ -200,9 +200,10 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
continue
|
continue
|
||||||
registerDefaultPlugin(name, s)
|
registerDefaultPlugin(name, s)
|
||||||
|
|
||||||
def inFilter(self, irc, msg):
|
def outFilter(self, irc, msg):
|
||||||
if msg.command == 'PRIVMSG' and msg.nick == irc.nick:
|
if msg.command == 'PRIVMSG' and not world.testing:
|
||||||
self.log.warning('Somehow sent a message to myself: %r.', msg)
|
if ircutils.strEqual(msg.args[0], irc.nick):
|
||||||
|
self.log.warning('Tried to send a message to myself: %r.', msg)
|
||||||
return None
|
return None
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user