From 76a7923519c986963bfce4f92959f9dc2a7935b7 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Wed, 13 Jul 2016 02:08:59 +0200 Subject: [PATCH] ...jetzt wirklich! --- otouto/bot.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/otouto/bot.lua b/otouto/bot.lua index b715748..3102899 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -105,10 +105,9 @@ function bot:on_msg_receive(msg, config) -- The fn run whenever a message is rec -- gsub out user name if multiple bots are in the same group if msg.text:match(config.cmd_pat..'([A-Za-z0-9-_-]+)@'..self.info.username) then - msg.text = string.gsub(msg.text, '@'..self.info.username, "") + msg.text = string.gsub(msg.text, config.cmd_pat..'([A-Za-z0-9-_-]+)@'..self.info.username, "/%1") msg.text_lower = msg.text:lower() end - msg = pre_process_msg(self, msg, config) for _, plugin in ipairs(self.plugins) do