diff mod_adhoc_cmd_uptime/mod_adhoc_cmd_uptime.lua @ 124:843cadf36306

mod_adhoc*: Move state handling to mod_adhoc itself
author Florian Zeitz <florob@babelmonkeys.de>
date Sat, 23 Jan 2010 04:43:28 +0100
parents a9898f13c89e
children
line wrap: on
line diff
--- a/mod_adhoc_cmd_uptime/mod_adhoc_cmd_uptime.lua	Fri Jan 22 19:05:28 2010 +0100
+++ b/mod_adhoc_cmd_uptime/mod_adhoc_cmd_uptime.lua	Sat Jan 23 04:43:28 2010 +0100
@@ -6,7 +6,7 @@
 
 local _G = _G;
 local prosody = _G.prosody;
-local st, uuid = require "util.stanza", require "util.uuid";
+local st = require "util.stanza";
 local adhoc_new = module:require "adhoc".new;
 
 function uptime()
@@ -23,8 +23,8 @@
 		minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time));
 end
 
-function uptime_command_handler (self, data, sessid)
-	return { info = uptime(), status = "completed" }, uuid.generate();
+function uptime_command_handler (self, data, state)
+	return { info = uptime(), status = "completed" };
 end
 
 local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler);