From 87ab22a9e6c24642a58d85a19b828446b27006f9 Mon Sep 17 00:00:00 2001 From: Yargo Date: Fri, 4 May 2018 11:25:46 +0000 Subject: add who command and telem.lua version --- telem.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'telem.lua') 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 -- cgit v1.2.3