mod_admin_adhoc: Fix 'Shut down service' command
authorFlorian Zeitz <florob@babelmonkeys.de>
Thu, 07 Feb 2013 22:11:35 +0100
changeset 5329 9fffd5fad4b3
parent 5328 5e15e6700412
child 5330 0a0ca2eb991b
child 5551 e1e06f1465be
mod_admin_adhoc: Fix 'Shut down service' command
plugins/mod_admin_adhoc.lua
--- a/plugins/mod_admin_adhoc.lua	Thu Feb 07 21:14:01 2013 +0100
+++ b/plugins/mod_admin_adhoc.lua	Thu Feb 07 22:11:35 2013 +0100
@@ -671,7 +671,7 @@
 			send_to_online(message);
 		end
 
-		timer_add_task(tonumber(fields.delay or "5"), prosody.shutdown);
+		timer_add_task(tonumber(fields.delay or "5"), function(time) prosody.shutdown("Shutdown by adhoc command") end);
 
 		return { status = "completed", info = "Server is about to shut down" };
 	else