diff options
author | Yargo <yargo@circumlunar.space> | 2018-05-04 11:25:46 +0000 |
---|---|---|
committer | Yargo <yargo@circumlunar.space> | 2018-05-04 11:25:46 +0000 |
commit | 87ab22a9e6c24642a58d85a19b828446b27006f9 (patch) | |
tree | de52b2b3f1793968c3a1c14a3f9d27e271681beb | |
parent | Initial commit of prototype. (diff) |
add who command and telem.lua version
Diffstat (limited to '')
-rwxr-xr-x | telem.lua | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,4 +1,5 @@ #!/usr/bin/lua5.2 +telemver = "0.2 // 2018-05-04" io = require("io") os = require("os") @@ -22,6 +23,7 @@ function cat_file(filename) end function show_welcome() + print("::::::::::: This is telem ver."..telemver.." :::::::::::") cat_file("/var/bbs/docs/welcome") end @@ -212,6 +214,10 @@ function do_stub() print("Stub!") end +function do_who() + os.execute("/usr/bin/who") +end + -- MAIN PROGRAM BODY BELOW show_welcome() @@ -236,6 +242,7 @@ dispatch["q"] = do_quit dispatch["t"] = do_type dispatch["?"] = do_help2 dispatch["!"] = do_rules +dispatch["w"] = do_who -- Infinite loop of command dispatch repeat |