I'm seeing easily spammable command add-ons being released and it's incredibly easy to give them a cooldown timer.
$Pref::Server::Addon::CooldownSeconds = 1;
function serverCmdDoThing(%client) {
if($Sim::Time - %client.lastCommandTime < $Pref::Server::Addon::CooldownSeconds) {
return;
}
%client.lastCommandTime = $Sim::Time;
// stuff
}
It's just a couple of extra lines :(