Going back to old regex trigger

This commit is contained in:
mrhanky 2017-07-06 20:11:16 +02:00
parent dba70a7910
commit 1869922cde
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -36,9 +36,8 @@ class Useless(DatabasePlugin):
if result: if result:
old = result['item'] old = result['item']
msg = re.sub(search, '\x02{}\x0F'.format(replace), old) msg = old.replace(search, '\x02{}\x0F'.format(replace))
msg = re.sub(r'\x01ACTION (.*)\x01', r'/me \1', msg) msg = re.sub(r'\x01ACTION (.*)\x01', r'/me \1', 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,
msg=msg)) msg=msg))