diff options
| author | 2021-10-25 22:40:13 +0100 | |
|---|---|---|
| committer | 2021-10-25 23:02:28 +0100 | |
| commit | beaae760bd7fb0afa05bc3fd7682e085b14b2930 (patch) | |
| tree | 0b24ff90cc345b6869840dd610ae47935c094cfe /src/server.cpp | |
| parent | Respect <security:hideserver> in the 005 numeric. (diff) | |
Add Server::GetPublicName(), fix not respecting <security:hideserver>.
Diffstat (limited to 'src/server.cpp')
| -rw-r--r-- | src/server.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp index dbc51e37c..46e7d6567 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -162,6 +162,13 @@ std::string UIDGenerator::GetUID() return current_uid; } +const std::string& Server::GetPublicName() const +{ + if (!ServerInstance->Config->HideServer.empty()) + return ServerInstance->Config->HideServer; + return GetName(); +} + void ISupportManager::AppendValue(std::string& buffer, const std::string& value) { // If this token has no value then we have nothing to do. |
