aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-09-19 15:23:34 +0100
committerGravatar Sadie Powell2024-09-19 15:40:45 +0100
commitc3e067e3bf1456faef2274eb3d9c4e6ac03b56b5 (patch)
tree14bfe316aca47a91360cf8f7ca867ea28f323215 /src/server.cpp
parentImplement remote WriteNotice in spanningtree like with WriteNumeric. (diff)
Add some extra methods to the Server class.
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 57714bfc6..b7b924170 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -162,6 +162,16 @@ const std::string& Server::GetPublicName() const
return GetName();
}
+size_t Server::GetOperCount() const
+{
+ return ServerInstance->Users.all_opers.size();
+}
+
+size_t Server::GetUserCount() const
+{
+ return ServerInstance->Users.LocalUserCount();
+}
+
void Server::SendMetadata(const std::string& key, const std::string& data) const
{
// Do nothing for the local server.