Advertisement
Terrah

uptime

Apr 12th, 2015
1,188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local function Uptime(msg,usr,chan)
  2.  
  3.     local chan = Channel():sub(2):lower();
  4.     if msg~=nil and msg~= "" then
  5.         chan = msg;
  6.     end
  7.  
  8.     local ok,bad = MOD.GetStream(chan);
  9.     if ok then 
  10.         local secs = MOD.TimestampToSec(ok.started);
  11.         print(ok.name.." has been online for "..MOD.SecondToSpan(os.time()-secs).." status: "..ok.status);
  12.     else
  13.         print(chan.." is offline ("..tostring(bad)..")");
  14.     end
  15. end
  16.  
  17. return Uptime;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement