InlineQuerys mit > 200 Zeichen werden jetzt ignoriert

This commit is contained in:
Andreas Bielawski 2016-09-08 01:48:14 +02:00
parent 8b7c55088a
commit 4e01c27673

View File

@ -189,6 +189,11 @@ function bot:process_inline_query(inline_query, config) -- When an inline query
inline_query.query = inline_query.query:gsub('"', '\\"') inline_query.query = inline_query.query:gsub('"', '\\"')
end end
if string.len(inline_query.query) > 200 then
abort_inline_query(inline_query)
return
end
for n=1, #self.plugins do for n=1, #self.plugins do
local plugin = self.plugins[n] local plugin = self.plugins[n]
match_inline_plugins(self, inline_query, config, plugin) match_inline_plugins(self, inline_query, config, plugin)