CallbackQuery: Verhindere Konflikt mit anderen Bots

This commit is contained in:
Andreas Bielawski
2016-07-09 15:10:31 +02:00
parent 0383799ed9
commit a1453c6795
2 changed files with 7 additions and 6 deletions

View File

@ -124,9 +124,10 @@ function bot:on_callback_receive(callback, msg, config) -- whenever a new callba
return
end
if not callback.data:find(':') then
if not callback.data:find(':') or not callback.data:find(self.info.username) then
return
end
callback.data = string.gsub(callback.data, '@'..self.info.username..' ', "")
local called_plugin = callback.data:match('(.*):.*')
local param = callback.data:sub(callback.data:find(':')+1)