mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Count services in the global user count.
This behaviour was always kinda broken so lets just drop it.
This commit is contained in:
parent
b9b3c03ccd
commit
b21ec4e9a9
@ -174,7 +174,7 @@ public:
|
||||
/** Return a count of fully connected connections on the network.
|
||||
* @return The number of fully connected users on the network.
|
||||
*/
|
||||
size_t GlobalUserCount() const { return this->clientlist.size() - this->UnknownUserCount() - this->ServiceCount(); }
|
||||
size_t GlobalUserCount() const { return this->clientlist.size() - this->UnknownUserCount(); }
|
||||
|
||||
/** Get a hash map containing all users, keyed by their nickname
|
||||
* @return A hash map mapping nicknames to User pointers
|
||||
|
@ -50,7 +50,7 @@ struct LusersCounters final
|
||||
{
|
||||
for (const auto& [_, u] : ServerInstance->Users.GetUsers())
|
||||
{
|
||||
if (!u->server->IsService() && u->IsModeSet(invisiblemode))
|
||||
if (u->IsModeSet(invisiblemode))
|
||||
invisible++;
|
||||
}
|
||||
}
|
||||
@ -135,9 +135,6 @@ public:
|
||||
if (!dest->IsFullyConnected())
|
||||
return;
|
||||
|
||||
if (dest->server->IsService())
|
||||
return;
|
||||
|
||||
if (change.adding)
|
||||
invisible++;
|
||||
else
|
||||
@ -166,13 +163,13 @@ public:
|
||||
void OnPostConnect(User* user) override
|
||||
{
|
||||
counters.UpdateMaxUsers();
|
||||
if (!user->server->IsService() && user->IsModeSet(invisiblemode))
|
||||
if (user->IsModeSet(invisiblemode))
|
||||
counters.invisible++;
|
||||
}
|
||||
|
||||
void OnUserQuit(User* user, const std::string& message, const std::string& oper_message) override
|
||||
{
|
||||
if (!user->server->IsService() && user->IsModeSet(invisiblemode))
|
||||
if (user->IsModeSet(invisiblemode))
|
||||
counters.invisible--;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user