Fixed bug, where the bot wouldn't really react.

This commit is contained in:
jmaa 2018-06-08 22:42:48 +02:00
parent ae5ed523d0
commit 529bec4270

View File

@ -522,13 +522,13 @@ local function handle_message(bot, user, channel, message, is_slow_channel)
-- Memes are restricted, a bit.
if is_slow_channel then
if not (FORRIGE_MEME + MEME_INTERVAL < os.time()) then return 'NOMEME' end
FORRIGE_MEME = os.time()
end
-- Bait msg
if message:match '%f[%a]bait%f[%A]' then
human_delay()
bot:sendChat(channel, generate_bait_link())
FORRIGE_MEME = os.time()
return 'BAIT'
end
@ -552,6 +552,7 @@ local function handle_message(bot, user, channel, message, is_slow_channel)
else
bot:sendChat(channel, 'Sorry, no can do. '..tostring(error_message)..'.')
end
FORRIGE_MEME = os.time()
return 'BRAIN'
end