Skip to content

feat: add config field to skip auto-join WHO and MODE#78

Open
vaaleyard wants to merge 1 commit into
lrstanley:masterfrom
vaaleyard:disable-auto-join-who-mode
Open

feat: add config field to skip auto-join WHO and MODE#78
vaaleyard wants to merge 1 commit into
lrstanley:masterfrom
vaaleyard:disable-auto-join-who-mode

Conversation

@vaaleyard

Copy link
Copy Markdown

🚀 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> and MODE <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 NAMES replies plus incremental JOIN, PART, NICK, and MODE events. 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 need LookupChannel, LookupUser, IsInChannel, etc.

So, this change adds two independent config fields:

  • DisableAutoWhoOnJoin
  • DisableAutoModeOnJoin

Both 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

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that causes existing functionality to not work as expected).
  • This change requires (or is) a documentation update.

📝 Notes to reviewer

🤝 Requirements

  • 💬 My changes as properly commented, primarily for hard-to-understand areas.
  • 📝 I have made corresponding changes to the documentation.
  • 🧪 I have included tests (if necessary) for this change.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant