randomseed and print info when msg is rejected
This commit is contained in:
parent
54203f7dbd
commit
8ee6e8fd4f
@ -36,12 +36,15 @@ end
|
|||||||
function msg_valid(msg)
|
function msg_valid(msg)
|
||||||
-- Dont process outgoing messages
|
-- Dont process outgoing messages
|
||||||
if msg.out then
|
if msg.out then
|
||||||
|
print("Not valid, msg from us")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if msg.date < now then
|
if msg.date < now then
|
||||||
|
print("Not valid, old msg")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if msg.unread == 0 then
|
if msg.unread == 0 then
|
||||||
|
print("Not valid, readed")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -221,3 +224,4 @@ end
|
|||||||
-- Start and load values
|
-- Start and load values
|
||||||
our_id = 0
|
our_id = 0
|
||||||
now = os.time()
|
now = os.time()
|
||||||
|
math.randomseed(now)
|
Reference in New Issue
Block a user