]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/server.h
Make BindPorts return size_t instead of int.
[user/henk/code/inspircd.git] / include / server.h
index d73c9673a8136302035de22e83971b54bf34c8cf..491754e1337f2465131c0ba0440adac931e22b73 100644 (file)
@@ -22,6 +22,9 @@
 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;
@@ -44,8 +47,25 @@ class CoreExport Server : public classbase
        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