- /** We don't use this constructor. Its a dummy, and won't cause any insertion
- * of the TreeServer into the hash_map. See below for the two we DO use.
- */
- TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance);
-
- /** We use this constructor only to create the 'root' item, Utils->TreeRoot, which
- * represents our own server. Therefore, it has no route, no parent, and
- * no socket associated with it. Its version string is our own local version.
- */
- TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::string Name, std::string Desc);
-
- /** When we create a new server, we call this constructor to initialize it.
- * This constructor initializes the server's Route and Parent, and sets up
- * its ping counters so that it will be pinged one minute from now.
- */
- TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::string Name, std::string Desc, TreeServer* Above, TreeSocket* Sock);
-
- int QuitUsers(const std::string &reason);
-
- /** This method is used to add the structure to the
- * hash_map for linear searches. It is only called
- * by the constructors.
- */
- void AddHashEntry();
-
- /** This method removes the reference to this object
- * from the hash_map which is used for linear searches.
- * It is only called by the default destructor.
- */
- void DelHashEntry();
-
- /** These accessors etc should be pretty self-
- * explanitory.
- */
- TreeServer* GetRoute();
- std::string GetName();
- std::string GetDesc();
- std::string GetVersion();
- void SetNextPingTime(time_t t);
- time_t NextPingTime();
- bool AnsweredLastPing();
- void SetPingFlag();
- int GetUserCount();
- void AddUserCount();
- void DelUserCount();
- int GetOperCount();
- TreeSocket* GetSocket();
- TreeServer* GetParent();
- void SetVersion(const std::string &Version);
- unsigned int ChildCount();
- TreeServer* GetChild(unsigned int n);
- void AddChild(TreeServer* Child);
- bool DelChild(TreeServer* Child);
-
- /** Removes child nodes of this node, and of that node, etc etc.
- * This is used during netsplits to automatically tidy up the
- * server tree. It is slow, we don't use it for much else.
- */
- bool Tidy();
-
- ~TreeServer();