--- 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");