diff options
| author | 2019-09-23 11:51:09 +0100 | |
|---|---|---|
| committer | 2019-09-23 13:18:19 +0100 | |
| commit | cf5d382b822cecd54fdbc77e4c1c4de8a8aa3c35 (patch) | |
| tree | f05c9f3c3acfc863dd053abacde791f32fa216f1 /src/modules/m_spanningtree/treeserver.h | |
| parent | Add the server id to the Server class. (diff) | |
Add whether the server split with an error to OnServerSplit.
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.h')
| -rw-r--r-- | src/modules/m_spanningtree/treeserver.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 90841d0b4..14413cd92 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -74,7 +74,7 @@ class TreeServer : public Server /** Used by SQuit logic to recursively remove servers */ - void SQuitInternal(unsigned int& num_lost_servers); + void SQuitInternal(unsigned int& num_lost_servers, bool error); /** Remove the reference to this server from the hash maps */ @@ -103,15 +103,17 @@ class TreeServer : public Server /** SQuit a server connected to this server, removing the given server and all servers behind it * @param server Server to squit, must be directly below this server * @param reason Reason for quitting the server, sent to opers and other servers + * @param error Whether the server is being squit because of an error. */ - void SQuitChild(TreeServer* server, const std::string& reason); + void SQuitChild(TreeServer* server, const std::string& reason, bool error = false); /** SQuit this server, removing this server and all servers behind it * @param reason Reason for quitting the server, sent to opers and other servers + * @param error Whether the server is being squit because of an error. */ - void SQuit(const std::string& reason) + void SQuit(const std::string& reason, bool error = false) { - GetParent()->SQuitChild(this, reason); + GetParent()->SQuitChild(this, reason, error); } static unsigned int QuitUsers(const std::string& reason); |
