aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_uptime.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_uptime.lua')
-rw-r--r--plugins/mod_uptime.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_uptime.lua b/plugins/mod_uptime.lua
index ccd8e511..8a01fb17 100644
--- a/plugins/mod_uptime.lua
+++ b/plugins/mod_uptime.lua
@@ -16,7 +16,7 @@ module:add_feature("jabber:iq:last");
module:hook("iq-get/host/jabber:iq:last:query", function(event)
local origin, stanza = event.origin, event.stanza;
- origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))}));
+ origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(("%d"):format(os.difftime(os.time(), start_time)))}));
return true;
end);
@@ -42,6 +42,6 @@ function uptime_command_handler ()
return { info = uptime_text(), status = "completed" };
end
-local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler);
+local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler, "any");
module:provides("adhoc", descriptor);