]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treeserver.h
m_spanningtree Assign an id to new Memberships
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treeserver.h
index 8178c87faf0c758112593833b125d75017f7c335..ab47012b0870d7cbce55e865041ba014fc58d732 100644 (file)
  * TreeServer items, deleting and inserting them as they
  * are created and destroyed.
  */
-class TreeServer : public classbase
+class TreeServer : public Server
 {
        TreeServer* Parent;                     /* Parent entry */
        TreeServer* Route;                      /* Route entry */
        std::vector<TreeServer*> Children;      /* List of child objects */
-       std::string ServerName;                 /* Server's name */
-       std::string ServerDesc;                 /* Server's description */
        std::string VersionString;              /* Version string or empty string */
        TreeSocket* Socket;                     /* Socket used to communicate with this server */
        time_t NextPing;                        /* After this time, the server should be PINGed*/
@@ -94,14 +92,6 @@ class TreeServer : public classbase
         */
        bool IsLocal() const { return (this->Route == this); }
 
-       /** Get server name
-        */
-       const std::string& GetName() const { return ServerName; }
-
-       /** Get server description (GECOS)
-        */
-       const std::string& GetDesc();
-
        /** Get server version string
         */
        const std::string& GetVersion();
@@ -180,6 +170,10 @@ class TreeServer : public classbase
        /** Recursive call for child servers */
        void FinishBurstInternal();
 
+       /** (Re)check the uline state of this server
+        */
+       void CheckULine();
+
        CullResult cull();
 
        /** Destructor
@@ -187,4 +181,13 @@ class TreeServer : public classbase
         * hash maps.
         */
        ~TreeServer();
+
+       /** Returns the TreeServer the given user is connected to
+        * @param user The user whose server to return
+        * @return The TreeServer this user is connected to.
+        */
+       static TreeServer* Get(User* user)
+       {
+               return static_cast<TreeServer*>(user->server);
+       }
 };