X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_spanningtree%2Ftreeserver.h;h=4465de15e4ea439563a86e0f4b3eae6eed2b4aab;hb=50ea7f41b2e4aca9ef9be31c056f862a7d90609a;hp=35af6510725ff93a9e88876e26198fba0c7c32c3;hpb=2a18ae111e7c1e0d0d26c54e8bd00a1a0affcf75;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 35af65107..4465de15e 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -71,7 +71,7 @@ class TreeServer : public Server /** Used by SQuit logic to recursively remove servers */ - void SQuitInternal(int& num_lost_servers); + void SQuitInternal(unsigned int& num_lost_servers); /** Remove the reference to this server from the hash maps */ @@ -113,13 +113,13 @@ class TreeServer : public Server GetParent()->SQuitChild(this, reason); } - static int QuitUsers(const std::string& 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(); + TreeServer* GetRoute() const { return Route; } /** Returns true if this server is the tree root (i.e.: us) */ @@ -136,7 +136,7 @@ class TreeServer : public Server /** Get server version string */ - const std::string& GetVersion(); + 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 @@ -178,16 +178,16 @@ class TreeServer : public Server /** Get the TreeSocket pointer for local servers. * For remote servers, this returns NULL. */ - TreeSocket* GetSocket(); + TreeSocket* GetSocket() const { return Socket; } /** Get the parent server. * For the root node, this returns NULL. */ - TreeServer* GetParent(); + TreeServer* GetParent() const { return Parent; } /** Set the server version string */ - void SetVersion(const std::string &Version); + void SetVersion(const std::string& verstr) { VersionString = verstr; } /** Set the full version string * @param verstr The version string to set @@ -204,17 +204,9 @@ class TreeServer : public Server */ const ChildServers& GetChildren() const { return Children; } - /** Add a child server - */ - void AddChild(TreeServer* Child); - - /** Delete a child server, return false if it didn't exist. - */ - bool DelChild(TreeServer* Child); - /** Get server ID */ - const std::string& GetID(); + const std::string& GetID() const { return sid; } /** Marks a server as having finished bursting and performs appropriate actions. */