From e4a3a71f79a5993341c0f92ac46a36d4e83ffd9a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 26 Apr 2026 16:21:30 -0300 Subject: Track unregistered connections and honor MODE -o Add :n-unreg counter on the components map: incremented when a client connects, decremented when it registers or disconnects. LUSERS now reports the real unregistered count from this counter (previously always 0 because unregistered clients are not in :clients). Also handle the 'o' character in user-mode setting so MODE -o actually clears :oper?, fixing the LuserOpers oper-count test. --- tests/integration.clj | 3 ++- tests/unit.clj | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/integration.clj b/tests/integration.clj index bee3f23..7b20575 100644 --- a/tests/integration.clj +++ b/tests/integration.clj @@ -51,7 +51,8 @@ :chan-limits (atom {}) :invites (atom {}) :whowas (atom []) - :max-users (atom 0)})) + :max-users (atom 0) + :n-unreg (atom 0)})) (defn- make-client "Creates a simulated client connection using piped streams. diff --git a/tests/unit.clj b/tests/unit.clj index c398350..687c91f 100644 --- a/tests/unit.clj +++ b/tests/unit.clj @@ -117,7 +117,8 @@ :chan-limits (atom {}) :invites (atom {}) :whowas (atom []) - :max-users (atom 0)}))) + :max-users (atom 0) + :n-unreg (atom 0)}))) (defn test-network! [conn] -- cgit v1.3