mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-29 22:29:24 +01:00
callbacks: Don't raise AssertionError when addressd() is called with a NOTICE
Some plugins (like LinkRelay) share code between NOTICE and PRIVMSG and they might call it unconditionally.
This commit is contained in:
parent
de277edb42
commit
ebaa346619
@ -80,6 +80,8 @@ def _addressed(irc, msg, prefixChars=None, nicks=None,
|
|||||||
payload = payload[len(prefixString):].lstrip()
|
payload = payload[len(prefixString):].lstrip()
|
||||||
return payload
|
return payload
|
||||||
|
|
||||||
|
if msg.command == 'NOTICE':
|
||||||
|
return ''
|
||||||
assert msg.command in ('PRIVMSG', 'TAGMSG'), msg.command
|
assert msg.command in ('PRIVMSG', 'TAGMSG'), msg.command
|
||||||
target = msg.channel or msg.args[0]
|
target = msg.channel or msg.args[0]
|
||||||
if not payload:
|
if not payload:
|
||||||
|
Loading…
Reference in New Issue
Block a user