From: Paul Hänsch Date: Thu, 5 Dec 2019 21:43:22 +0000 (+0100) Subject: prevent message dropping, problem was faulty double submit detection X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=b46d7732e01e6762cbb05123aa9fd90774ed5c53;p=httpchat prevent message dropping, problem was faulty double submit detection --- diff --git a/channel.sh b/channel.sh index 4088994..83b38d9 100755 --- a/channel.sh +++ b/channel.sh @@ -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")"