diff --git a/otouto/bot.lua b/otouto/bot.lua index 5c9a63f..6a51b99 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -83,12 +83,6 @@ function bot:on_msg_receive(msg, config) -- The fn run whenever a message is rec msg.text_lower = msg.text:lower() end - if is_channel_disabled(msg)then - if not is_sudo(msg, config) or msg.text ~= "/channel enable" then - return - end - end - msg = pre_process_msg(self, msg, config) if not msg then return end -- deleted by banning @@ -349,7 +343,6 @@ function create_plugin_set() 'echo', 'currency', 'banhammer', - 'channels', 'plugins', 'settings', 'help' diff --git a/otouto/utilities.lua b/otouto/utilities.lua index a670efc..98fa9de 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -983,18 +983,6 @@ function table.contains(table, element) return false end --- Checks if bot was disabled on specific chat -function is_channel_disabled(msg) - local hash = 'chat:'..msg.chat.id..':disabled' - local disabled = redis:get(hash) - - if not disabled or disabled == "false" then - return false - end - - return disabled -end - -- Converts a gross string back into proper UTF-8. -- Useful for fixing improper encoding caused by bad JSON escaping. function utilities.fix_utf8(str)