From 7818049e2353476bbaac9fa7eb36ec55ba93a06a Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Tue, 13 Aug 2013 11:31:51 +0800 Subject: [PATCH] Add support for ACTION Before and after: http://with-you.pw/6I4Z --- plugins/correction.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/correction.py b/plugins/correction.py index 37068ab..586b192 100644 --- a/plugins/correction.py +++ b/plugins/correction.py @@ -17,7 +17,11 @@ def correction(inp, say=None, input=None, notice=None, db=None): find = splitinput[1] replace = splitinput[2] if find in last_message[1]: - say("%s meant to say: %s" % (nick, last_message[1].replace(find, "\x02" + replace + "\x02"))) + if "\x01ACTION" in last_message[1]: + message = last_message[1].replace("\x01ACTION ", "/me ").replace("\x01", "") + else: + message = last_message[1] + say("%s meant to say: %s" % (nick, message.replace(find, "\x02" + replace + "\x02"))) else: notice("%s can't be found in your last message" % find) else: