Kick message: #GameUI_Disconnect_TooManyCommands
Temporary workaround:
from cvars import cvar
from commands.server import ServerCommand
from engines.server import queue_command_string
sv_quota_stringcmdspersecond = cvar.find_var('sv_quota_stringcmdspersecond')
if sv_quota_stringcmdspersecond is None:
raise Exception('Fix is not required for this game.')
old_value = sv_quota_stringcmdspersecond.get_string()
@ServerCommand('ent_fire')
def on_ent_fire(command):
sv_quota_stringcmdspersecond.set_string('99999')
queue_command_string(f'sv_quota_stringcmdspersecond {old_value}')
This needs to be improved, because of:
- DOS attacks if sv_cheats is enabled
- Also needs to be done for the other cheat commands like es.give, es.entcreate, etc.
- It's ugly