From d35a3e8770a483b33f6c653678c352d842db8fe8 Mon Sep 17 00:00:00 2001 From: yago Date: Sun, 12 Apr 2015 23:21:37 +0200 Subject: [PATCH] removed is_disabled on msg_vaild. Fix --- bot/bot.lua | 8 +++----- plugins/channels.lua | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bot/bot.lua b/bot/bot.lua index bce7d64..3d247ba 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -34,20 +34,18 @@ function msg_valid(msg) print("Not valid, msg from us") return false end + + -- Before bot was started if msg.date < now then print("Not valid, old msg") return false end + if msg.unread == 0 then print("Not valid, readed") return false end - if is_disabled(msg) then - print("Disabled channel") - return false - end - return true end diff --git a/plugins/channels.lua b/plugins/channels.lua index d5060a1..b2d25b6 100644 --- a/plugins/channels.lua +++ b/plugins/channels.lua @@ -31,7 +31,7 @@ local function disable_channel( receiver ) _config.disabled_channels = {} end - _config.disabled_channels[receiver] = false + _config.disabled_channels[receiver] = true save_config() return "Channel disabled"