From cad2f3f979b2fc45bcfa7c7b7652bbe201a5b0a0 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Sat, 4 Apr 2020 02:58:59 -0600 Subject: Ignore clients on ulined servers when counting invisible users. This is in addition to 4cc992f. --- src/coremods/core_lusers.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/coremods') diff --git a/src/coremods/core_lusers.cpp b/src/coremods/core_lusers.cpp index 62a6ef48c..7587a3443 100644 --- a/src/coremods/core_lusers.cpp +++ b/src/coremods/core_lusers.cpp @@ -120,6 +120,9 @@ public: if (dest->registered != REG_ALL) return; + if (dest->server->IsULine()) + return; + if (adding) invisible++; else @@ -141,7 +144,7 @@ class ModuleLusers : public Module for (user_hash::const_iterator i = users.begin(); i != users.end(); ++i) { User* u = i->second; - if (u->IsModeSet(invisiblemode)) + if (!u->server->IsULine() && u->IsModeSet(invisiblemode)) c++; } return c; @@ -159,13 +162,13 @@ class ModuleLusers : public Module void OnPostConnect(User* user) CXX11_OVERRIDE { counters.UpdateMaxUsers(); - if (user->IsModeSet(invisiblemode)) + if (!user->server->IsULine() && user->IsModeSet(invisiblemode)) counters.invisible++; } void OnUserQuit(User* user, const std::string& message, const std::string& oper_message) CXX11_OVERRIDE { - if (user->IsModeSet(invisiblemode)) + if (!user->server->IsULine() && user->IsModeSet(invisiblemode)) counters.invisible--; } -- cgit v1.2.3