Skip to content

Conversation

@Nord1cWarr1or
Copy link
Collaborator

This PR refactors enum usage in command functions to address issue #340.

Changes made:

  • Removed named enum types (amx_gag_s, args_s) from ConCmd_amx_gag and SrvCmd_AddReason functions
  • Added constants (AMX_GAG_ARG_COUNT, ARGS_COUNT) for array sizes and argument counts
  • Updated enum to be unnamed in all command functions (matching SrvCmd_AddWhitelistCmd style)
  • Replaced sizeof(args) with constant value in SrvCmd_AddReason
  • Maintained all functionality while making enum usage consistent across functions

Fixes: #340

- Added arg_cmd to enum and marked as unused
- Changed argument count comparison from >= to > to fix validation
@Nord1cWarr1or Nord1cWarr1or merged commit 8784c1e into ChatAdditions:master Dec 7, 2025
2 checks passed
@Nord1cWarr1or Nord1cWarr1or deleted the feature/fix-amx-gag-command-args branch December 7, 2025 15:57
@Nord1cWarr1or Nord1cWarr1or self-assigned this Dec 9, 2025
@Nord1cWarr1or Nord1cWarr1or added bug Something isn't working gag plugin related to Gag plugin labels Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gag plugin related to Gag plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect count of arguments for the amx_gag command

1 participant