summaryrefslogtreecommitdiff
path: root/include/configreader.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-12-20 03:04:21 +0000
committerSadie Powell <sadie@witchery.services>2020-12-20 03:05:29 +0000
commit6cfabb0064cab52bbbab59974e53dc0fa1954da7 (patch)
treeaa755e92103730ba6428332b4094578cde91cc67 /include/configreader.h
parent029ff235e184acc8194e76ef535e437cb6c9f614 (diff)
Hide the server name/desc better when <options:hideserver> is set.
Diffstat (limited to 'include/configreader.h')
-rw-r--r--include/configreader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 7274dfad8..3a5ea9c60 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -451,6 +451,12 @@ class CoreExport ServerConfig
*/
const std::string& GetSID() const { return sid; }
+ /** Retrieves the server name which should be shown to users. */
+ const std::string& GetServerName() const { return HideServer.empty() ? ServerName : HideServer; }
+
+ /** Retrieves the server description which should be shown to users. */
+ const std::string& GetServerDesc() const { return HideServer.empty() ? ServerDesc : HideServer; }
+
/** Read the entire configuration into memory
* and initialize this class. All other methods
* should be used only by the core.