Repository navigation
fix: run the admin commands from the server console and rcon - #116
Merged
Merged
Conversation
- sm_forcetag, sm_forcetagcolor, sm_forcenamecolor and sm_forcetextcolor answered with CPrintToChat, which throws for the server console. New PrintToChatOrReply() helper: chat for players, command reply for the console. - sm_cccaddtag, sm_cccdeletetag, sm_cccaddtrigger, sm_cccdeletetrigger, sm_cccban and sm_cccunban called GetClientUserId(0), which throws. They store userid 0 for the console like sm_cccimportreplacefile, and sm_cccban stores "Console" as the issuer name. - The requests and callbacks treat userid 0 as the server console: they only drop a request when a real player left. The console uses retry slot 0, which SQL_BeginRequest() now resets. The "replace list full" and "import failed" messages go to the server console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of #109, split from #110.
Changes
PrintToChatOrReply()helper: chat for players, command reply for the server console. Used by the tag and color set functions, sosm_forcetag,sm_forcetagcolor,sm_forcenamecolorandsm_forcetextcolorwork from the console and rcon.sm_cccaddtag,sm_cccdeletetag,sm_cccaddtrigger,sm_cccdeletetrigger,sm_cccbanandsm_cccunbanstoreclient ? GetClientUserId(client) : 0likesm_cccimportreplacefile, andsm_cccbanstores the issuer name with%N("Console" for the server).SQL_BeginRequest()now resets. The "replace list full" and "import failed" messages go to the server console.Checks
🤖 Generated with Claude Code