From 4e01c276734a550f04fb46aeadfb28139928d5fc Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Thu, 8 Sep 2016 01:48:14 +0200 Subject: [PATCH] InlineQuerys mit > 200 Zeichen werden jetzt ignoriert --- otouto/bot.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/otouto/bot.lua b/otouto/bot.lua index b66c104..5a3febc 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -189,6 +189,11 @@ function bot:process_inline_query(inline_query, config) -- When an inline query inline_query.query = inline_query.query:gsub('"', '\\"') end + if string.len(inline_query.query) > 200 then + abort_inline_query(inline_query) + return + end + for n=1, #self.plugins do local plugin = self.plugins[n] match_inline_plugins(self, inline_query, config, plugin)