changeset 674:57dd82ac2a06

quotedb: Rename some variables.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 23 Feb 2021 15:10:44 +0200
parents afe4b1fe5e79
children 09be9264ee79
files quotedb.tcl
diffstat 1 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/quotedb.tcl	Tue Feb 23 15:09:51 2021 +0200
+++ b/quotedb.tcl	Tue Feb 23 15:10:44 2021 +0200
@@ -439,7 +439,7 @@
 
 
 #-------------------------------------------------------------------------
-proc qdb_cmd {ucmd utable unick uhost uhand uchan utext upublic} {
+proc qdb_cmd {ucmd utable unick uhost uhand uchan uargs upublic} {
   global qdb_channels
 
   # Check if command comes from allowed channel or is private
@@ -448,38 +448,38 @@
   }
 
   # Trim argument text
-  set utext [string trim $utext]
+  set uargs [string trim $uargs]
 
-  if {$utext == "" || $utext == {}} {
+  if {$uargs == "" || $uargs == {}} {
     # No arguments, assume random query
     qdb_show $ucmd $utable $upublic $unick $uhost $uhand $uchan -1
-  } elseif {[regexp {^(stat|stats|tilasto|tilastot)$} $utext]} {
+  } elseif {[regexp {^(stat|stats|tilasto|tilastot)$} $uargs]} {
     # Statistics
-    qdb_stats $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext
-  } elseif {[regexp {^(last|latest|uusin|viimeisin)$} $utext]} {
+    qdb_stats $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs
+  } elseif {[regexp {^(last|latest|uusin|viimeisin)$} $uargs]} {
     # Latest added
     qdb_show $ucmd $utable $upublic $unick $uhost $uhand $uchan -2
-  } elseif {[regexp {^([0-9]+)$} $utext -> unum]} {
+  } elseif {[regexp {^([0-9]+)$} $uargs -> unum]} {
     # Numeric argument, assume id query
     qdb_show $ucmd $utable $upublic $unick $uhost $uhand $uchan $unum
-  } elseif {[regexp {^top\s*([0-9]+)?$} $utext -> uargs]} {
+  } elseif {[regexp {^top\s*([0-9]+)?$} $uargs -> rargs]} {
     # Toplist of quotes
-    qdb_toplist $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext $uargs
-  } elseif {[regexp {^add\s*(.*)$} $utext -> uargs]} {
+    qdb_toplist $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs $rargs
+  } elseif {[regexp {^add\s*(.*)$} $uargs -> rargs]} {
     # Add quote
-    qdb_add $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs
-  } elseif {[regexp {^del\s*([0-9]*)$} $utext -> uargs]} {
+    qdb_add $ucmd $utable $upublic $unick $uhost $uhand $uchan $rargs
+  } elseif {[regexp {^del\s*([0-9]*)$} $uargs -> rargs]} {
     # Delete quote
-    qdb_delete $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs
-  } elseif {[regexp {^update\s*(.*)$} $utext -> uargs]} {
+    qdb_delete $ucmd $utable $upublic $unick $uhost $uhand $uchan $rargs
+  } elseif {[regexp {^update\s*(.*)$} $uargs -> rargs]} {
     # Modify/update quote
-    qdb_update $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs
-  } elseif {[regexp {^find\s*(.*)$} $utext -> uargs]} {
+    qdb_update $ucmd $utable $upublic $unick $uhost $uhand $uchan $rargs
+  } elseif {[regexp {^find\s*(.*)$} $uargs -> rargs]} {
     # Find quote(s)
-    qdb_find $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs
-  } elseif {[regexp {^vote\s*(.*)$} $utext -> uargs]} {
+    qdb_find $ucmd $utable $upublic $unick $uhost $uhand $uchan $rargs
+  } elseif {[regexp {^vote\s*(.*)$} $uargs -> rargs]} {
     # Vote
-    qdb_vote $ucmd $utable $upublic $unick $uhost $uhand $uchan $uargs
+    qdb_vote $ucmd $utable $upublic $unick $uhost $uhand $uchan $rargs
   } else {
     # Help/usage
     qdb_msg $ucmd $utable $upublic $unick $uchan "help"