changeset 510:794ecdfe6ac0

quotedb: Fix handling of 'vote' command parameters in case of '!xxx vote <1|-1>' to vote for the latest added quote.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 01 May 2020 13:17:21 +0300
parents 0e3d24e02239
children 44a041396e8a cc0efa677aa9
files quotedb.tcl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/quotedb.tcl	Thu Apr 30 23:59:04 2020 +0300
+++ b/quotedb.tcl	Fri May 01 13:17:21 2020 +0300
@@ -246,7 +246,7 @@
   }
 
   set uvote 1
-  if {$utext == "" || [regexp {^\s*-1$} $utext umatch uvote]} {
+  if {$utext == "" || [regexp {^\s*(-?1)\s*$} $utext umatch uvote]} {
     set usql "SELECT max(id) AS qid FROM ${utable}"
     set uid 0
     qdb_handle eval $usql { set uid $qid }