From 528477c5749e95a30dc839071953f0ef667f3ca0 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Fri, 23 Feb 2018 18:51:55 -0500 Subject: [PATCH] Use strict inequality for message time Otherwise we were getting too many alerts due to reconnections. Since we don't use messages for high bandwidth, this is probably fine. --- init3.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init3.lua b/init3.lua index 612004b..68916e2 100644 --- a/init3.lua +++ b/init3.lua @@ -113,8 +113,8 @@ nwfnet.onmqtt["init"] = function(c,t,m) ctfws_lcd:drawMessage(m) else mt = tonumber(mt) - if (ctfws.startT == nil or ctfws.startT <= mt) - and (lastMsgTime == nil or lastMsgTime <= mt) + if (ctfws.startT == nil or ctfws.startT <= mt) -- message for this game + and (lastMsgTime == nil or lastMsgTime < mt) -- latest message (strict) then lastMsgTime = mt ctfws_lcd:drawMessage(ms) -- 2.50.1