X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Ftreeserver.h;h=753a7bc131000b28ad2ea75bee079a19a5f3420b;hb=HEAD;hp=037edd1943599c8165fb409ec41990ff09e2b3d1;hpb=77730fd5f09f8fc193205654c8bba84d34365670;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 037edd194..753a7bc13 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -1,9 +1,14 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2017 B00mX0r + * Copyright (C) 2013, 2017, 2019 Sadie Powell + * Copyright (C) 2012-2015 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2009-2010 Daniel De Graaf * Copyright (C) 2008 Robin Burchell + * Copyright (C) 2007, 2010 Craig Edwards * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2007 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -51,7 +56,6 @@ class TreeServer : public Server std::string rawversion; TreeSocket* Socket; /* Socket used to communicate with this server */ - std::string sid; /* Server ID */ /** Counter counting how many servers are bursting in front of this server, including * this server. Set to parents' value on construction then it is increased if the @@ -75,7 +79,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 */ @@ -104,15 +108,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); @@ -153,7 +159,7 @@ class TreeServer : public Server */ unsigned long rtt; - /** When we recieved BURST from this server, used to calculate total burst time at ENDBURST. + /** When we received BURST from this server, used to calculate total burst time at ENDBURST. */ uint64_t StartBurst; @@ -194,10 +200,6 @@ class TreeServer : public Server */ const ChildServers& GetChildren() const { return Children; } - /** Get server ID - */ - const std::string& GetID() const { return sid; } - /** Marks a server as having finished bursting and performs appropriate actions. */ void FinishBurst();