diff options
| author | 2019-10-17 19:11:25 +0100 | |
|---|---|---|
| committer | 2019-10-17 19:11:25 +0100 | |
| commit | 8c0912f428afc6340693f2c55ed82358e4a4579a (patch) | |
| tree | 343f165286957d866d4a1ce6b9f374dc54bc2fd2 /src/modules/m_spanningtree/main.cpp | |
| parent | Add an event which is fired when the server shuts down. (diff) | |
SQuit all servers when a shutdown happens.
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 3e992f39f..fbc6ad40c 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -793,6 +793,13 @@ void ModuleSpanningTree::OnMode(User* source, User* u, Channel* c, const Modes:: } } +void ModuleSpanningTree::OnShutdown(const std::string& reason) +{ + const TreeServer::ChildServers& children = Utils->TreeRoot->GetChildren(); + while (!children.empty()) + children.front()->SQuit(reason, true); +} + CullResult ModuleSpanningTree::cull() { if (Utils) |
