chiark / gitweb /
rename testmode setting; permit + in command names
authorian <ian>
Sun, 1 Jun 2008 22:18:29 +0000 (22:18 +0000)
committerian <ian>
Sun, 1 Jun 2008 22:18:29 +0000 (22:18 +0000)
hostside/multiplex

index 1b97aba7f2a1c08afe3d541c0f384b9b49d239f3..feeb6f2f5ad66b36add4c6b165ca9786e6451100 100755 (executable)
@@ -247,7 +247,7 @@ proc process-command {conn l} {
        if {[regexp {^#} $l]} return; # comments ?!  ok then ...
        set l [string trim $l]
        if {![string length $l]} return
-       if {![regexp {^((!?)[-a-z0-9]+)(?:\s.*)?$} $l dummy cmd priv]} {
+       if {![regexp {^((!?)[-+a-z0-9]+)(?:\s.*)?$} $l dummy cmd priv]} {
            error "improper command name" {} {TRAIN CMDNAK BadCmd}
        }
        if {[regexp {[^ \t!-~]} $l]} {
@@ -515,10 +515,10 @@ proc clear-replay-detects {} {
 }
 
 proc realtime-inputline {dummy l} {
-    global detectlag replay cmdstdin
+    global detectlag replay testmode
     global executing currentcmd currentconn
 
-    if {$cmdstdin && [regexp {^%(.*)} $l dummy rhs]} {
+    if {$testmode && [regexp {^%(.*)} $l dummy rhs]} {
        set r [catch { uplevel #0 $rhs } emsg]
        if {$r} { puts "** $emsg\n" } else { puts "=> $emsg\n" }
        return
@@ -665,17 +665,17 @@ proc binding {addr blist} {
 }
 
 proc startup {} {
-    global queueing executing cmdstdin realtime port
+    global queueing executing testmode realtime port
     catch { close $master }; catch { unset master }
 
-    setting cmdstdin 0 {[01]}
+    setting testmode 0 {[01]}
     parse-argv {}
     
     uplevel #0 source multiplex-config
     set queueing {}
     set executing 0
     realtime-notrunning-init
-    if {$cmdstdin} {
+    if {!$testmode} {
        start_commandloop
     } else {
        fconfig-trainproto stdin