Fixed bug, where the bot wouldn't really react.
This commit is contained in:
parent
ae5ed523d0
commit
529bec4270
3
main.lua
3
main.lua
|
@ -522,13 +522,13 @@ local function handle_message(bot, user, channel, message, is_slow_channel)
|
||||||
-- Memes are restricted, a bit.
|
-- Memes are restricted, a bit.
|
||||||
if is_slow_channel then
|
if is_slow_channel then
|
||||||
if not (FORRIGE_MEME + MEME_INTERVAL < os.time()) then return 'NOMEME' end
|
if not (FORRIGE_MEME + MEME_INTERVAL < os.time()) then return 'NOMEME' end
|
||||||
FORRIGE_MEME = os.time()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bait msg
|
-- Bait msg
|
||||||
if message:match '%f[%a]bait%f[%A]' then
|
if message:match '%f[%a]bait%f[%A]' then
|
||||||
human_delay()
|
human_delay()
|
||||||
bot:sendChat(channel, generate_bait_link())
|
bot:sendChat(channel, generate_bait_link())
|
||||||
|
FORRIGE_MEME = os.time()
|
||||||
return 'BAIT'
|
return 'BAIT'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -552,6 +552,7 @@ local function handle_message(bot, user, channel, message, is_slow_channel)
|
||||||
else
|
else
|
||||||
bot:sendChat(channel, 'Sorry, no can do. '..tostring(error_message)..'.')
|
bot:sendChat(channel, 'Sorry, no can do. '..tostring(error_message)..'.')
|
||||||
end
|
end
|
||||||
|
FORRIGE_MEME = os.time()
|
||||||
return 'BRAIN'
|
return 'BRAIN'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user