aboutsummaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2019-10-17 17:17:39 +0100
committerGravatar Peter Powell2019-10-17 17:17:39 +0100
commite3deb783406e15cf496afab6971a908215b2ea81 (patch)
tree93a08baff27b27f541bd32dc79a594460100c194 /src/inspircd.cpp
parentUse separate build dirs when rebuilding with a different compiler. (diff)
Add an event which is fired when the server shuts down.
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 70e5fcf38..f35482f61 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -93,8 +93,11 @@ void InspIRCd::Cleanup()
}
ports.clear();
- // Disconnect all local users
+ // Tell modules that we're shutting down.
const std::string quitmsg = "Server shutting down";
+ FOREACH_MOD(OnShutdown, (quitmsg));
+
+ // Disconnect all local users
const UserManager::LocalList& list = Users.GetLocalUsers();
while (!list.empty())
ServerInstance->Users.QuitUser(list.front(), quitmsg);