Diff

mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.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
parent 121:a9898f13c89e
line wrap: on
line diff
--- a/mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua	Fri Jan 22 19:05:28 2010 +0100
+++ b/mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua	Sat Jan 23 04:43:28 2010 +0100
@@ -7,9 +7,9 @@
 local st = require "util.stanza";
 local adhoc_new = module:require "adhoc".new;
 
-function ping_command_handler (self, data, sessid)
+function ping_command_handler (self, data, state)
 	local now = os.date("%Y-%m-%dT%X");
-	return { info = "Pong\n"..now, status = "completed" }, now;
+	return { info = "Pong\n"..now, status = "completed" };
 end
 
 local descriptor = adhoc_new("Ping", "ping", ping_command_handler);