From 8ee6e8fd4fa2017af04c1c6f04154287dd47ef68 Mon Sep 17 00:00:00 2001 From: yago Date: Sun, 15 Feb 2015 14:02:26 +0100 Subject: [PATCH] randomseed and print info when msg is rejected --- bot/bot.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/bot.lua b/bot/bot.lua index 74fd762..22c0198 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -36,12 +36,15 @@ end function msg_valid(msg) -- Dont process outgoing messages if msg.out then + print("Not valid, msg from us") return false end 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 end @@ -221,3 +224,4 @@ end -- Start and load values our_id = 0 now = os.time() +math.randomseed(now) \ No newline at end of file