Comparison

plugins/mod_uptime.lua @ 8344:071c0523c4cb

mod_uptime: Remove unused arguments [luacheck]
author Kim Alvefur <zash@zash.se>
date Fri, 20 Oct 2017 06:54:06 +0200
parent 5776:bd0ff8ae98a8
child 8962:6c06bd455bbf
comparison
equal deleted inserted replaced
8343:5df2f240173b 8344:071c0523c4cb
37 return string.format("This server has been running for %d day%s, %d hour%s and %d minute%s (since %s)", 37 return string.format("This server has been running for %d day%s, %d hour%s and %d minute%s (since %s)",
38 days, (days ~= 1 and "s") or "", hours, (hours ~= 1 and "s") or "", 38 days, (days ~= 1 and "s") or "", hours, (hours ~= 1 and "s") or "",
39 minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time)); 39 minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time));
40 end 40 end
41 41
42 function uptime_command_handler (self, data, state) 42 function uptime_command_handler ()
43 return { info = uptime_text(), status = "completed" }; 43 return { info = uptime_text(), status = "completed" };
44 end 44 end
45 45
46 local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler); 46 local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler);
47 47