raspberrymatic-addon-rmupdate/addon/lib/session.tcl

14 lines
276 B
Tcl
Raw Normal View History

2018-07-22 00:21:44 +02:00
#!/bin/tclsh
load tclrega.so
proc check_session sid {
if {[regexp {@([0-9a-zA-Z]{10})@} $sid all sidnr]} {
set res [lindex [rega_script "Write(system.GetSessionVarStr('$sidnr'));"] 1]
if {$res != ""} {
return 1
}
}
return 0
}