Replacing ACTION with /me

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

View File

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