splewis / csgo-practice-mode

CS:GO Sourcemod plugin for private team/individual practice servers
GNU General Public License v3.0
457 stars 71 forks source link

Command sm_botplace works even if practice mode is disabled #256

Closed Dying-Ducks closed 1 year ago

Dying-Ducks commented 1 year ago

Expected behavior

No command from the practice mode plugin should work if the plugin is disabled.

Actual behavior

Use the command sm_botplace while the practice mode is not active and it will spawn a bot.

Steps to reproduce

Disable practice mode with sm_exitpractice or start your server with sm_practicemode_autostart 0. Use sm_botplace anyway, the bot will spawn. The bot will also appear with the chat alias .botplace.

I searched for other bot commands with the same issue and only find sm_swapbot also works while the plugin is disabled.

Every other command I tested behaves as intended. So, unfortunately, also the command sm_removebot doesn’t work because practice mode isn’t active. When you use sm_botplace unintentionally (I have a bind) you must start the practice mode, to be able to kick the bot.

Additionally testing revealed that we can observe the same behavior when sm_practicemode_can_be_started is set to 0. You can spawn a bot with sm_botplace and move him with sm_swapbot, even when you can’t start the practice mode itself. So, in this case it needs a restart to remove the bots.