]> git.plutz.net Git - httpchat/commitdiff
prevent message dropping, problem was faulty double submit detection
authorPaul Hänsch <paul@plutz.net>
Thu, 5 Dec 2019 21:43:22 +0000 (22:43 +0100)
committerPaul Hänsch <paul@plutz.net>
Thu, 5 Dec 2019 21:43:22 +0000 (22:43 +0100)
channel.sh

index 408899445bbedbe436bcc6469b733575d34eb8eb..83b38d951aec003255859639a0c655967c354a01 100755 (executable)
@@ -21,7 +21,7 @@ case $(POST action) in
     else
       lasttime=0
     fi
-    if [ -f "$chatfile" -a "$channelkey" = "$(POST channelkey)" -a "$(POST timenonce)" -gt "$lasttime" ]; then
+    if [ -f "$chatfile" -a "$channelkey" = "$(POST channelkey)" -a "$(POST timenonce)" -ge "$lasttime" ]; then
       printf "%s %s: %s\n" "$(date +%F_%T)" "$(STRING "$nickname")" "$(POST message |STRING)" >>"$chatfile"
     fi
     REDIRECT "$(URL "/$LOCATION")"