feat: better opt-out hint + auto opt-out after repeated declines#16
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe module now tracks module-created battleground invites, counts consecutive declines, sends configurable hints, and automatically opts players out after a threshold. PlayerSettings persistence, lifecycle hooks, command messaging, configuration, documentation, and ChangesDecline-driven invite handling
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Player
participant mod_bg_auto_queue_player
participant BgAutoQueue
participant GroupQueueInfo
Player->>mod_bg_auto_queue_player: Respond to or leave battleground invite
mod_bg_auto_queue_player->>BgAutoQueue: Forward battlefield or expiry event
BgAutoQueue->>GroupQueueInfo: Validate tracked queue and invite timing
BgAutoQueue->>BgAutoQueue: Update decline count or opt-out state
BgAutoQueue->>Player: Send hint or automatic opt-out notice
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR enhances the battleground auto-queue module’s opt-out UX by (1) showing a clearer hint after declined/expired invites and (2) automatically opting a character out after a configurable number of consecutive declined/ignored module invites, while keeping manual queues unaffected.
Changes:
- Add a
PlayerScriptto observe battlefield port actions, invite expiry desertion, and logout for per-player decline tracking and cleanup. - Extend PlayerSettings usage to track consecutive declines and distinguish manual opt-out vs auto opt-out (with updated
.bgeventsstatus messaging). - Document and expose new configuration options (
BgAutoQueue.DeclineHint.Enable,BgAutoQueue.OptOutAfterDeclines) across README/docs/conf.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/mod_bg_auto_queue_scripts.cpp |
Adds player hooks to feed invite/decline/expiry/logout events into the module for tracking. |
src/cs_bg_auto_queue.cpp |
Updates .bgevents status output to distinguish auto opt-out messaging from manual opt-out. |
src/BgAutoQueue.h |
Introduces PlayerSettings indices for decline count + auto opt-out state and adds tracked-queue bookkeeping. |
src/BgAutoQueue.cpp |
Implements decline counting, auto opt-out, player-facing hint/notice messages, and tracked queue identity validation. |
README.md |
Documents the decline hint + auto opt-out behavior and how PlayerSettings indices are used. |
docs/how-it-works.md |
Updates user-facing explanation of declining behavior and automatic opt-out semantics. |
conf/mod-bg-auto-queue.conf.dist |
Adds and documents new config knobs for hints and auto opt-out threshold. |
.gitignore |
Ignores .claude local artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/BgAutoQueue.cpp`:
- Around line 1083-1099: Update SendOptOutNotice to accept the actual decline
count as a parameter, propagate the count from OnModuleInviteDeclined at the
call site, and use that parameter in the player-facing StringFormat message
instead of _optOutAfterDeclines; update the declaration in BgAutoQueue.h
accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3c8d4edf-7d2a-4c36-a83f-970e5246dccf
📒 Files selected for processing (8)
.gitignoreREADME.mdconf/mod-bg-auto-queue.conf.distdocs/how-it-works.mdsrc/BgAutoQueue.cppsrc/BgAutoQueue.hsrc/cs_bg_auto_queue.cppsrc/mod_bg_auto_queue_scripts.cpp
Summary by CodeRabbit
New Features
.bgevents onresets the decline count and re-enables invitations.Documentation
Chores
.claudefrom being tracked by Git.