summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-10-17 17:17:39 +0100
committerPeter Powell <petpow@saberuk.com>2019-10-17 17:17:39 +0100
commite3deb783406e15cf496afab6971a908215b2ea81 (patch)
tree93a08baff27b27f541bd32dc79a594460100c194 /src/inspircd.cpp
parent08393c002803b93ac53a6a1a0a5272e76b6ae5e4 (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);