prosody

changeset 1026
e640df2e4e9b
parent 1017
6556a9db3822
child 1084
422be8f8911c
--- a/prosody	Tue Apr 21 21:10:42 2009 +0100
+++ b/prosody	Tue Apr 21 22:05:21 2009 +0100
@@ -160,6 +160,7 @@
 -- Global function to initiate prosody shutdown
 function prosody_shutdown(reason)
 	log("info", "Shutting down: %s", reason or "unknown reason");
+	eventmanager.fire_event("server-stopping", { reason = reason });
 	server.setquitting(true);
 end
 
@@ -198,6 +199,8 @@
 	socket.sleep(0.2);
 end
 
+eventmanager.fire_event("server-cleanup");
+
 -- Ok, we're quitting I know, but we
 -- need to do some tidying before we go :)
 server.setquitting(false);
@@ -224,3 +227,5 @@
 end
 
 server.closeall();
+
+eventmanager.fire_event("server-stopped");

mercurial