RelayNext: strip CTCPs other than actions

This commit is contained in:
James Lu 2016-02-24 18:25:02 -08:00
parent f4cde05c85
commit 1ae2baa347

View File

@ -163,9 +163,13 @@ class RelayNext(callbacks.Plugin):
elif chobj.isVoice(real_nick):
nick = '+' + nick
# Check for CTCP ACTION and format those properly.
if re.match('^\x01ACTION .*\x01$', text):
text = text[8:-1]
s = '* %s %s' % (nick, text)
elif text.startswith('\x01'):
# Other CTCP messages should just be ignored
return
else:
s = '<%s> %s' % (nick, msg.args[1])