From 47b2f6b8f7a69d46e5ee28973b2bdd41bc3d43c7 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Mon, 29 Aug 2016 21:01:07 +0200 Subject: [PATCH] Brohoof /) --- miku/bot.lua | 2 +- miku/plugins/special.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/miku/bot.lua b/miku/bot.lua index 35ef91a..51d9fef 100644 --- a/miku/bot.lua +++ b/miku/bot.lua @@ -64,7 +64,7 @@ function bot:on_msg_receive(msg, config) -- The fn run whenever a message is rec -- Cache user info for those involved. -- print messages - msg_time = '\27[36m'..convert_timestamp(msg.date, '[%H:%M:%S] ')..'\27[0m' + msg_time = '\27[36m'..convert_timestamp(msg.date, '[%H:%M:%S]')..'\27[0m' if msg.chat.title then from_chat = ' \27[36m'..msg.chat.title..':\27[0m ' diff --git a/miku/plugins/special.lua b/miku/plugins/special.lua index 339c20d..dc99134 100644 --- a/miku/plugins/special.lua +++ b/miku/plugins/special.lua @@ -27,7 +27,10 @@ special.triggers = { "^[Pp][Ee]$", "^[Vv][Aa]$", "^[Mm][Uu]$", - "^/[Ii][Yy][Kk][Ww][Ii][Mm]$" + "^/[Ii][Yy][Kk][Ww][Ii][Mm]$", + "^/%)$", + "^%(\\$" + } function special:action(msg, config, matches) @@ -106,6 +109,10 @@ function special:action(msg, config, matches) output = 'schi' elseif msg_text:match("/[Ii][Yy][Kk][Ww][Ii][Mm]") then output = '(¬‿¬)' + elseif msg_text:match("/%)") then + output = '(\\' + elseif msg_text:match("%(\\") then + output = '/)' end utilities.send_reply(msg, output)