]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/server.h
Send * for empty targets in the no such nick/channel message.
[user/henk/code/inspircd.git] / include / server.h
index 3d88547344d55ac863e35d9f7fc1ae4bbab7a89c..491754e1337f2465131c0ba0440adac931e22b73 100644 (file)
 class CoreExport Server : public classbase
 {
  protected:
+       /** The unique identifier for this server. */
+       const std::string id;
+
        /** The name of this server
         */
        const std::string name;
 
-       /** The description of this server
+       /** The description of this server.
+        * This can be updated by the protocol module (for remote servers) or by a rehash (for the local server).
         */
-       const std::string description;
+       std::string description;
 
        /** True if this server is ulined
         */
@@ -38,9 +42,30 @@ class CoreExport Server : public classbase
         */
        bool silentuline;
 
+       /** Allow ConfigReaderThread to update the description on a rehash
+        */
+       friend class ConfigReaderThread;
+
  public:
-       Server(const std::string& srvname, const std::string& srvdesc)
-               : name(srvname), description(srvdesc), uline(false), silentuline(false) { }
+       Server(const std::string& srvid, const std::string& srvname, const std::string& srvdesc)
+               : id(srvid)
+               , name(srvname)
+               , description(srvdesc)
+               , uline(false)
+               , silentuline(false)
+       {
+       }
+
+       DEPRECATED_METHOD(Server(const std::string& srvname, const std::string& srvdesc))
+               : name(srvname)
+               , description(srvdesc)
+               , uline(false)
+               , silentuline(false)
+       {
+       }
+
+       /** Retrieves the unique identifier for this server (e.g. 36C). */
+       const std::string& GetId() const { return id; }
 
        /**
         * Returns the name of this server
@@ -48,7 +73,7 @@ class CoreExport Server : public classbase
         */
        const std::string& GetName() const { return name; }
 
-       /** Returns the description (GECOS) of this server
+       /** Returns the description of this server
         * @return The description of this server
         */
        const std::string& GetDesc() const { return description; }