diff options
author | Peter Powell <petpow@saberuk.com> | 2019-09-23 11:49:26 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-09-23 13:18:14 +0100 |
commit | a4305d8f3c3e613be839bdcd61a1d14c87fed5aa (patch) | |
tree | 16e01b6079f017c00d2bda2da0fcb759b98a5ea1 /include/server.h | |
parent | b64177d3fb4f113c4db3325575970964867f01cc (diff) |
Add the server id to the Server class.
Diffstat (limited to 'include/server.h')
-rw-r--r-- | include/server.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/server.h b/include/server.h index d73c9673a..491754e13 100644 --- a/include/server.h +++ b/include/server.h @@ -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 |