Repository navigation
Fix show_expired change hook attached to the wrong convar - #26
Merged
Merged
Conversation
hCvar.AddChangeHook(OnShowExpiredChange) attached the expired-display callback to the show_group convar instead of hCvar1 (show_expired), so changing vip_vo_show_expired at runtime never took effect and changing vip_vo_show_group incorrectly also overwrote g_bShowExpired. Fixes #25 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is a minimal, correct fix for the reported hook miswiring, and no additional related issues were found in the surrounding convar hook usage.
Review effort: Lite
Findings: None
What changed in this PR
This pull request fixes a convar change-hook wiring bug in the SourceMod SourcePawn plugin so that runtime changes to vip_vo_show_expired correctly update the cached g_bShowExpired flag (aligning behavior with Issue #25).
Changes:
- Attach
OnShowExpiredChangeto the correct convar instance (hCvar1/vip_vo_show_expired) instead ofhCvar(vip_vo_show_group).
| File | Description |
|---|---|
| addons/sourcemod/scripting/VIP_VIPsOnline.sp | Fixes the change hook target so vip_vo_show_expired updates g_bShowExpired correctly at runtime. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Updated plugin version and fixed minor convar issue.
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.
Summary
hCvar.AddChangeHook(OnShowExpiredChange)attached the expired-display callback to the show_group convar instead ofhCvar1(show_expired).Fixes #25
Test plan
🤖 Generated with Claude Code