diff --git a/config.lua.example b/config.lua.example index f4eb86a..5f7c9c9 100644 --- a/config.lua.example +++ b/config.lua.example @@ -24,10 +24,6 @@ Sende /hilfe, um zu starten -- false = only whitelisted users can use inline querys -- NOTE that it doesn't matter, if the chat is whitelisted! The USER must be whitelisted! enable_inline_for_everyone = true, - - -- Botan.io statistics - enable_statistics = false, - botan_token = '', errors = { -- Generic error messages used in various plugins. generic = 'An unexpected error occurred.', diff --git a/otouto/bot.lua b/otouto/bot.lua index 2d9d6db..cba20a2 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -5,7 +5,7 @@ local bindings -- Load Telegram bindings. local utilities -- Load miscellaneous and cross-plugin functions. local redis = (loadfile "./otouto/redis.lua")() -bot.version = '2.2.2' +bot.version = '2.2.3' function bot:init(config) -- The function run when the bot is started or reloaded. @@ -254,15 +254,6 @@ function match_plugins(self, msg, config, plugin) utilities.handle_exception(self, result, msg.from.id .. ': ' .. msg.text, config) return end - - -- Analytics - if config.enable_analytics and config.botan_token ~= '' then - for _,plugin in ipairs(self.plugins) do - if plugin.name == 'botan' then - plugin.action(self, msg, config, nil, plugin_name) - end - end - end -- If the action returns a table, make that table the new msg. if type(result) == 'table' then diff --git a/otouto/plugins/botan.lua b/otouto/plugins/botan.lua deleted file mode 100644 index e7a44ac..0000000 --- a/otouto/plugins/botan.lua +++ /dev/null @@ -1,34 +0,0 @@ -local botan = {} - -local https = require('ssl.https') -local URL = require('socket.url') -local redis = (loadfile "./otouto/redis.lua")() -local utilities = require('otouto.utilities') -local bindings = require('otouto.bindings') - -function botan:init(config) - if not config.botan_token then - print('Missing config value: botan_token.') - print('botan.lua will not be enabled.') - return - end - botan.triggers = { - "^/nil$" - } -end - -local BASE_URL = 'https://api.botan.io/track' - -function botan:appmetrica(text, token, plugin_name) - https.request(BASE_URL..'/?token='..token..'&uid=1&name='..plugin_name) -end - -function botan:action(msg, config, matches, plugin_name) - if not plugin_name then - return - end - - botan:appmetrica(msg.text, config.botan_token, plugin_name) -end - -return botan \ No newline at end of file