From 0d434db39ccfc8dab51c5e752eef4d10723a5420 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Fri, 19 Aug 2016 00:04:39 +0200 Subject: [PATCH 1/2] Echo: Ersetze / am Anfang bei Echo --- otouto/plugins/echo.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/otouto/plugins/echo.lua b/otouto/plugins/echo.lua index b19899a..2bd4518 100644 --- a/otouto/plugins/echo.lua +++ b/otouto/plugins/echo.lua @@ -35,6 +35,12 @@ function echo:action(msg) output = '*Echo:*\n"' .. utilities.md_escape(input) .. '"' utilities.send_message(self, msg.chat.id, output, true, nil, true) return + elseif msg.chat.type == 'group' then + local b = 1 + while b ~= 0 do + input = utilities.trim(input) + input,b = input:gsub('^/+','') + end end utilities.send_message(self, msg.chat.id, input, true, nil, true) end From 4b2a36c4243e7e15223aaf467cc746e861a16e36 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Fri, 19 Aug 2016 14:05:16 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Fixe=20cache=5Fdata()=20f=C3=BCr=20Hashes?= =?UTF-8?q?=20(Crash=20bei=20Bitly)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/utilities.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otouto/utilities.lua b/otouto/utilities.lua index 0de7f07..62eb0b1 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -729,7 +729,7 @@ function cache_data(plugin, query, data, timeout, typ, hash_field) redis:sadd(hash, str) end else - redis:hset(hash, hash_field, data) + redis:hmset(hash, data) end if timeout then redis:expire(hash, timeout)