diff --git a/config.lua b/config.lua index de56b10..943bc5b 100755 --- a/config.lua +++ b/config.lua @@ -68,10 +68,10 @@ telegram.me/otouto realm_name = 'My Realm' }, plugins = { - 'blacklist.lua', - 'floodcontrol.lua', 'control.lua', + 'blacklist.lua', 'about.lua', + 'floodcontrol.lua', 'ping.lua', 'whoami.lua', 'nick.lua', diff --git a/plugins/about.lua b/plugins/about.lua index 620ede8..687c4cb 100755 --- a/plugins/about.lua +++ b/plugins/about.lua @@ -7,6 +7,10 @@ local triggers = { local action = function(msg) + -- Filthy hack, but here is where we'll stop forwarded messages from hitting + -- other plugins. + if msg.forward_from then return end + local message = config.about_text .. '\nBased on otouto v'..version..' by topkecleon.\notouto v3 is licensed under the GPLv2.\ntopkecleon.github.io/otouto' if msg.new_chat_participant and msg.new_chat_participant.id == bot.id then diff --git a/plugins/floodcontrol.lua b/plugins/floodcontrol.lua index c8e05df..a25bb6c 100755 --- a/plugins/floodcontrol.lua +++ b/plugins/floodcontrol.lua @@ -31,7 +31,8 @@ local action = function(msg) floodcontrol[input.groupid] = os.time() + input.duration - print(input.groupid .. ' silenced for ' .. input.duration .. ' seconds.') + local output = input.groupid .. ' silenced for ' .. input.duration .. ' seconds.' + handle_exception('floodcontrol.lua', output) end