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]} {
}
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
}
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