X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fserver.h;h=1aacdc2d97a9514f4235e71183e81b904de5700c;hb=635cb9d65f6d7f6758ae8ed874da00c8d94b6e39;hp=d73c9673a8136302035de22e83971b54bf34c8cf;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/server.h b/include/server.h index d73c9673a..1aacdc2d9 100644 --- a/include/server.h +++ b/include/server.h @@ -1,6 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2019-2020 Sadie Powell + * Copyright (C) 2018 Matt Schatz * Copyright (C) 2014 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -22,6 +24,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; @@ -35,7 +40,7 @@ class CoreExport Server : public classbase */ bool uline; - /** True if this server is a silent uline, i.e. silent="true" in the uline block + /** True if this server is a silent uline, i.e. silent="yes" in the uline block */ bool silentuline; @@ -44,8 +49,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