Skip to content

Conversation

@lechuga16
Copy link
Contributor

@lechuga16 lechuga16 commented Mar 22, 2025

Restructured the entire plugin to enhance functionality and management of casters.

Main Functionalities:

  • Caster Registration: Enables players to register as casters.
  • Whitelist Management: Manages a whitelist of players authorized to self-register as casters.
  • Spectator Immunity: Grants certain players immunity from being kicked.
  • SQL Integration: Supports MySQL and SQLite databases for storing and managing the caster whitelist.
  • Voting System: Includes a system for voting to kick spectators.

Commands:

- sm_caster: Register a player as a caster.
- sm_caster_ls: List all registered casters.
- sm_caster_rm: Remove a player from the casters list.
- sm_caster_rs: Reset the casters list.
- sm_caster_wl: Add a player to the whitelist.
- sm_caster_wl_ls: List all players on the whitelist.
- sm_caster_wl_rm: Remove a player from the whitelist.
- sm_caster_wl_rs: Reset the whitelist.
- sm_caster_sql: Add a player to the whitelist in the database.
- sm_caster_sql_ls: List all players on the database whitelist.
- sm_caster_sql_rm: Remove a player from the database whitelist.
- sm_caster_sql_rs: Reset the database whitelist.
- sm_cast: Allow a player to self-register as a caster.
- sm_uncast: Allow a player to remove themselves from the casters list.

- sm_kickspecs: Initiate a vote to kick inactive spectators.

Registration Details:

  • If no argument is provided to registration commands, a menu displaying the players currently in the game is shown.
  • The commands accept either the player's name or their SteamID.

SQL Details:

  • The database stores the player's SteamID along with the server ID.
  • Only players from the assigned server ID are retrieved.
  • Players are added to the whitelist.
  • A command is available to re-download the player list in case of discrepancies.

Self-Registration:

  • Players on the whitelist can self-register as casters.
  • Administrators can self-appoint as casters even if they are not on the whitelist.

Convars:

  • "caster_whitelist" disables the whitelist, allowing any user to register as a caster.
  • "caster_selfreg" enables self-registration commands.
  • "caster_addons" enables custom caster addons.
  • "caster_kickspecs_inmunity" enables a list of players who are immune to the sm_kickspecs command.

API Enhancements:

  • Added hooks and forwards to handle casters, whitelist, and immunity.

- Restructured the entire plugin to enhance functionality and management of casters.

Main Functionalities:
- Caster Registration: Enables players to register as casters.
- Whitelist Management: Manages a whitelist of players authorized to self-register as casters.
- Spectator Immunity: Grants certain players immunity from being kicked.
- SQL Integration: Supports MySQL and SQLite databases for storing and managing the caster whitelist.
- Voting System: Includes a system for voting to kick spectators.

Commands:
sm_caster: Register a player as a caster.
sm_caster_ls: List all registered casters.
sm_caster_rm: Remove a player from the casters list.
sm_caster_rs: Reset the casters list.

sm_caster_wl: Add a player to the whitelist.
sm_caster_wl_ls: List all players on the whitelist.
sm_caster_wl_rm: Remove a player from the whitelist.
sm_caster_wl_rs: Reset the whitelist.

sm_caster_sql: Add a player to the whitelist in the database.
sm_caster_sql_ls: List all players on the database whitelist.
sm_caster_sql_rm: Remove a player from the database whitelist.
sm_caster_sql_rs: Reset the database whitelist.

sm_cast: Allow a player to self-register as a caster.
sm_uncast: Allow a player to remove themselves from the casters list.

sm_kickspecs: Initiate a vote to kick inactive spectators.

Registration Details:
- If no argument is provided to registration commands, a menu displaying the players currently in the game is shown.
- The commands accept either the player's name or their SteamID.

SQL Details:
- The database stores the player's SteamID along with the server ID.
- Only players from the assigned server ID are retrieved.
- Players are added to the whitelist.
- A command is available to re-download the player list in case of discrepancies.

Self-Registration:
- Players on the whitelist can self-register as casters.
- Administrators can self-appoint as casters even if they are not on the whitelist.

Convars:
- "caster_whitelist" disables the whitelist, allowing any user to register as a caster.
- "caster_selfreg" enables self-registration commands.
- "caster_addons" enables custom caster addons.
- "caster_kickspecs_inmunity" enables a list of players who are immune to the sm_kickspecs command.

API Enhancements:
- Added hooks and forwards to handle casters, whitelist, and immunity.
…amline target handling and improve code readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant