Repository navigation
fix(permissions): only offer the personal tag menu to ADMFLAG_CUSTOM1 - #121
Merged
Merged
Conversation
The personal tag and colors are only read back on join for ADMFLAG_CUSTOM1 (OnClientPostAdminCheck), but !settings > Tag Settings opened the full tag menu with no flag check. Admins with only ADMFLAG_GENERIC (and players with no flags) could change their tag and colors, see them for the rest of the map, then lose them on the next map; each save also overwrote the stored row with the group tag values. - Menu_Main only lists the personal items (current, tag, name, chat, toggle) for ADMFLAG_CUSTOM1, and keeps the "Administrative Options" entry for slay/cheats admins; with neither it prints a no-access message. - MenuHandler_Main re-checks the flags on select. - The Tag Settings entry of !settings is disabled without either access. - Bump to 8.1.9.
Rushaway
marked this pull request as ready for review
November 18, 2026 11:58
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.
Problem
The plugin uses different checks for the personal tag and colors:
!tagmenu,!tag,!tagcolor...ADMFLAG_CUSTOM1!settings> Tag Settings >Menu_Main()ccc_tagOnClientPostAdminCheck)ADMFLAG_CUSTOM1(ADMFLAG_GENERIConly gets the group tag)So an admin with
bbut noto(or any player with no flags) could open the tag menu from!settings, change their tag and colors, see them for the rest of the map (the chat display acceptsboro), and lose them on the next map. Each save also wrote the whole row back with the group tag values plus the one changed field.The personal tag stays a
ADMFLAG_CUSTOM1feature (the flag of every personal tag command and the only one whose row is loaded), so the fix is to stop offering it to anyone else, not to load it forb.Changes
Menu_Main()only lists the personal items (current, tag, name, chat, colors toggle) forADMFLAG_CUSTOM1. The Administrative Options entry stays for slay/cheats admins, sosm_cccreset/sm_cccbanfrom the menu keep working for them. With neither, it prints a newCCC_NoTagAccessmessage instead of opening.MenuHandler_Mainre-checks the flags on select (admins can be reloaded while the menu is open).!settingsis drawn disabled without either access (kept, so the item indexes of the handler stay the same).CCC_NoTagAccess(en, fr, ru, es, de, pt, chi).Checked
Tested in game on a CS:S test server (SM 1.13, 64-bit), CCC on SQLite, with the CI
package-sm1.13build. The admin flags were forced with a temporary helper plugin (SetUserAdmininOnClientPostAdminFilter, removed afterwards).abcfjkpadmin (noo): Tag Settings opened the full personal menu (current, tag, name, chat, toggle).abcfjkpadmin: Tag Settings opens the menu with Administrative Options only; the admin submenu (reset/ban/unban) opens and Back returns to it.abcdefjkopadmin (witho): full menu;sm_tag+sm_namecolorsaved, still there after a map change (View Current Settings).