+ void SQuit(const std::string& reason)
+ {
+ GetParent()->SQuitChild(this, reason);
+ }
+
+ static unsigned int QuitUsers(const std::string& reason);
+
+ /** Get route.
+ * The 'route' is defined as the locally-
+ * connected server which can be used to reach this server.
+ */
+ TreeServer* GetRoute() const { return Route; }
+
+ /** Returns true if this server is the tree root (i.e.: us)
+ */
+ bool IsRoot() const { return (this->Parent == NULL); }
+
+ /** Returns true if this server is locally connected
+ */
+ bool IsLocal() const { return (this->Route == this); }
+
+ /** Returns true if the server is awaiting destruction
+ * @return True if the server is waiting to be culled and deleted, false otherwise
+ */
+ bool IsDead() const { return isdead; }
+
+ /** Get server version string
+ */
+ const std::string& GetVersion() const { return VersionString; }
+
+ /** Get the full version string of this server
+ * @return The full version string of this server, including patch version and other info
+ */
+ const std::string& GetFullVersion() const { return fullversion; }
+
+ /** Round trip time of last ping
+ */
+ unsigned long rtt;
+
+ /** When we recieved BURST from this server, used to calculate total burst time at ENDBURST.
+ */
+ uint64_t StartBurst;
+
+ /** True if this server is hidden
+ */
+ bool Hidden;
+
+ /** Get the TreeSocket pointer for local servers.
+ * For remote servers, this returns NULL.
+ */
+ TreeSocket* GetSocket() const { return Socket; }
+
+ /** Get the parent server.
+ * For the root node, this returns NULL.
+ */
+ TreeServer* GetParent() const { return Parent; }
+
+ /** Set the server version string
+ */
+ void SetVersion(const std::string& verstr) { VersionString = verstr; }
+
+ /** Set the full version string
+ * @param verstr The version string to set
+ */
+ void SetFullVersion(const std::string& verstr) { fullversion = verstr; }
+
+ /** Sets the description of this server. Called when the description of a remote server changes
+ * and we are notified about it.
+ * @param descstr The description to set
+ */
+ void SetDesc(const std::string& descstr) { description = descstr; }
+
+ /** Return all child servers
+ */
+ 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();
+ /** Recursive call for child servers */
+ void FinishBurstInternal();
+
+ /** (Re)check the uline state of this server
+ */
+ void CheckULine();
+
+ /** Get the bursting state of this server
+ * @return True if this server is bursting, false if it isn't
+ */
+ bool IsBursting() const { return (StartBurst != 0); }