Conversation
The early return checked g_sOriginalClanTag[client], a snapshot used only by RestoreOriginalClanTag() to undo the VIP tag later, as if it gated whether the VIP tag should be applied. In practice this meant the VIP tag feature only ever worked for players with no clan tag at connect time - anyone already carrying one (e.g. from CountryTags/ClanTag/CustomChatColors) got nothing when toggling the feature on, silently. Fixes #25 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
With the early-return removed, the current OnClientSettingsChanged() logic can overwrite the saved “original” clan tag while the VIP tag is active, causing restores to revert to the VIP tag instead of the player’s real original tag.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR fixes the VIP tag feature so it applies even when a player already has a clan tag set, aligning SetVipTag() behavior with the intended “apply configured VIP tag when enabled” logic described in issue #25.
Changes:
- Removed the
SetVipTag()early return that incorrectly prevented applying the VIP tag for players with an existing clan tag.
| File | Description |
|---|---|
| addons/sourcemod/scripting/VIP_Tag.sp | Removes the g_sOriginalClanTag guard so VIP clan tags are applied consistently when the feature is enabled. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
69
to
73
| public void SetVipTag(int client) | ||
| { | ||
| if (g_sOriginalClanTag[client][0] != '\0') | ||
| return; | ||
|
|
||
| char sTag[64]; | ||
| VIP_GetClientFeatureString(client, VIP_TAG, sTag, sizeof(sTag)); | ||
| CS_SetClientClanTag(client, sTag); |
Member
Author
|
This is on purpose. |
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
SetVipTag()'s early-return checked the saved original clan tag (used only byRestoreOriginalClanTag()) as if it gated whether to apply the VIP tag, making the feature a no-op for any player who already had a clan tag set.Fixes #25
Test plan
🤖 Generated with Claude Code