Replacing ACTION with /me

This commit is contained in:
mrhanky 2017-07-04 18:56:40 +02:00
parent 325c7f47a3
commit 4d725c04b4
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -37,6 +37,7 @@ class Useless(DatabasePlugin):
if result:
old = result['item']
msg = re.sub(search, '\x02{}\x0F'.format(replace), old)
msg = re.sub(r'\x01ACTION (.*)\x01', r'/me \1', msg),
print(msg)
if old != msg:
self.bot.privmsg(target, '<{nick}> {msg}'.format(nick=nick,