Entferne "Channels"-Plugin, Bot kann jetzt nicht mehr in einzelnen Channels deaktiviert werden

This commit is contained in:
Andreas Bielawski 2016-09-21 20:35:22 +02:00
parent 2078028ae0
commit c7fde261f5
2 changed files with 0 additions and 19 deletions

View File

@ -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() msg.text_lower = msg.text:lower()
end 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) msg = pre_process_msg(self, msg, config)
if not msg then return end -- deleted by banning if not msg then return end -- deleted by banning
@ -349,7 +343,6 @@ function create_plugin_set()
'echo', 'echo',
'currency', 'currency',
'banhammer', 'banhammer',
'channels',
'plugins', 'plugins',
'settings', 'settings',
'help' 'help'

View File

@ -983,18 +983,6 @@ function table.contains(table, element)
return false return false
end 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. -- Converts a gross string back into proper UTF-8.
-- Useful for fixing improper encoding caused by bad JSON escaping. -- Useful for fixing improper encoding caused by bad JSON escaping.
function utilities.fix_utf8(str) function utilities.fix_utf8(str)