LABEL(flood_control)
if (!timeout_status) // not while paused
{
+ if(MUTATOR_CALLHOOK(ClientCommand_FloodControl, this, strtolower(argv(0)), argc, command))
+ break; // a mutator has prevented flood control
entity store = IS_CLIENT(this) ? CS(this) : this; // unfortunately, we need to store these on the client initially
// this is basically the same as the chat flood control
if (time < store.cmd_floodtime)
/**/
MUTATOR_HOOKABLE(SV_ParseClientCommand, EV_SV_ParseClientCommand);
+/**
+ * please read EV_SV_ParseClientCommand description before using
+ * return true to skip flood control on the given command
+ */
+#define EV_ClientCommand_FloodControl(i, o) \
+ /** client sending the command */ i(entity, MUTATOR_ARGV_0_entity) \
+ /** command name */ i(string, MUTATOR_ARGV_1_string) \
+ /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_2_int) \
+ /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_3_string) \
+ /**/
+MUTATOR_HOOKABLE(ClientCommand_FloodControl, EV_ClientCommand_FloodControl);
+
/** please read EV_SV_ParseClientCommand description before using */
#define EV_SV_ParseServerCommand(i, o) \
/** command name */ i(string, MUTATOR_ARGV_0_string) \