]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commit
Improve SVQC command flood control
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 24 Nov 2022 11:43:40 +0000 (21:43 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 6 Jan 2023 07:16:34 +0000 (17:16 +1000)
commiteb8924c8335a28fbce4369c0728eccee58d1fc07
treecfa7a1eb2edb4b10fcca94d97ed3ab92f97625a6
parentc59fcef6877f5f8c9598fe387c10399e93dde18b
Improve SVQC command flood control

Changes to the same logic used by chat flood control which is more
progressive.  The previous command flood control was only triggered if a
client managed to send more than 8 commands within 1 second, and then
it reset immediately.

Prints an informative message when flood control blocks a command.
Previously this was silent.

Special cases the client's initial connect commands, as these would
otherwise trigger the new flood logic with the current default settings.

Exempts chat commands from command flood control, as these have their
own flood control.

Simplifies the code for max perf.
qcsrc/server/chat.qc
qcsrc/server/client.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/cmd.qh