Skip to content

Command Monitor

Mr. Silence edited this page Jul 26, 2019 · 6 revisions

This module manages, monitors, and/or checks for commands being used by players on the server. It manages commands that can be used to lag, crash, or freeze the server and manages them accordingly by either blocking them, kicking the player, banning the player, etc.


smac_antispam_cmds “20” - Amount of commands in one second before kick. (0 = Disabled). smac_anticmdspam_kick “1” - Choose to kick or simply notify that commands are being spammed. (0 = Notify 1 = Kick)

Please note that the difference between the two commands above is that smac_antispam_cmds will check for commands being spammed (or not at all if set to 0) while smac_anticmdspam_kick will disable the kick feature from the command spam check in the plugin.

Be warned that setting smac_anticmdspam_kick to 0 and disabling the kick feature will not stop a user from spamming commands and it will continue to write to the smac logs when a spam detection occurs.


  • smac_addcmd <command> <0=block-only; 1=ban; 2=kick> - Adds a command to be blocked by SMAC.
  • smac_addignorecmd <command> - Adds a command to ignore on command spam.
  • smac_removecmd <command> - Removes a command from the block list.
  • smac_removeignorecmd <command> - Remove a command to ignore.

Please be aware that these commands need to be added to a configuration file (such as server.cfg, sourcemod.cfg, or smac.cfg) in order to be applied permanently.

Detection Sample (Log)

Hacker1 (ID: STEAM_0:0:1234567890 | IP: was banned for command usage violation of command: sm_command
Hacker2 (ID: STEAM_0:0:1234567890 | IP: was banned for command usage violation of command: sm_command

Other Considerations

To see what commands might already be cheats or not, please reference this page:

Please note that, when blocking plugins, this plugin simply attempts to ignore the command rather than set it to sv_cheats to prevent it from being used. If you are having issues with this functionality or would rather attempt to block commands by setting it to an sv_cheat, please use this plugin instead:

This plugin (as well as the one linked above) DOES NOT BLOCK "sm plugins list" or commands similar to this. It is hardcoded into Sourcemod itself and cannot be blocked by plugin. It is also not supported to block those commands, so please do not request or ask for this as it will ignored.

If you want to block commands from plugins, you may want to consider either editing the plugin and/or set the command to only be usable by admins. Using this plugin to block another plugin's commands is not advised as most plugins are open source and can been recompiled without use of the command.

Finally, please be aware that not all commands can be blocked/prevented, including some client-side commands that players can use. While you can sometimes detect when they are being used, and sometimes take actions like kick/ban against them for doing so, it does not mean that you can always successfully block the command itself from working. For those types of commands, you'll either need dev assistance or you'll need to figure an alternative means to block the command without kicking/banning the player, which is not easy and beyond the scope of this plugin.

Forum Discussion

To be added at a later date.

You can’t perform that action at this time.