aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYargo <yargo@circumlunar.space>2018-05-04 11:25:46 +0000
committerYargo <yargo@circumlunar.space>2018-05-04 11:25:46 +0000
commit87ab22a9e6c24642a58d85a19b828446b27006f9 (patch)
treede52b2b3f1793968c3a1c14a3f9d27e271681beb
parentInitial commit of prototype. (diff)
add who command and telem.lua version
Diffstat (limited to '')
-rwxr-xr-xtelem.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/telem.lua b/telem.lua
index d5c985b..d5670b2 100755
--- a/telem.lua
+++ b/telem.lua
@@ -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