feat: add config field to skip auto-join WHO and MODE#78
Open
vaaleyard wants to merge 1 commit into
Open
Conversation
Allow clients to disable girc's automatic self-JOIN WHO and MODE requests independently, while keeping channel/user tracking enabled for consumers that rely on state lookups. Signed-off-by: Leonardo Essia <leonardo@essia.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Changes proposed by this PR
Allow clients to disable girc's automatic self-JOIN WHO and MODE requests independently, while keeping channel/user tracking enabled to keep possible to rely on state lookups.
girc currently sends
WHO <channel>andMODE <channel>whenever the client joins a channel. That is useful as the default because it hydrates channel/user and mode state eagerly.However, some clients join many channels and already maintain enough UI/state from
NAMESreplies plus incrementalJOIN,PART,NICK, andMODEevents. For those clients, the automatic per-channel WHO/MODE burst can be a significant startup cost.DisableTracking()is not a good fit for this case because it disables too much: I would still needLookupChannel,LookupUser,IsInChannel, etc.So, this change adds two independent config fields:
DisableAutoWhoOnJoinDisableAutoModeOnJoinBoth default to false, preserving existing behavior. When enabled, they only suppress the automatic requests sent after the client’s own JOIN. Tracking remains enabled and can still be populated by NAMES replies and subsequent channel events.
🧰 Type of change
📝 Notes to reviewer
🤝 Requirements