@quake2ts/server 0.0.753 → 0.0.756

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -490,6 +490,7 @@ var DedicatedServer = class {
490
490
  port: 27910,
491
491
  maxPlayers: DEFAULT_MAX_CLIENTS,
492
492
  deathmatch: true,
493
+ floodLimit: 200,
493
494
  ...options
494
495
  };
495
496
  this.transport = this.options.transport || new WebSocketTransport();
@@ -1160,7 +1161,8 @@ var DedicatedServer = class {
1160
1161
  client.lastCommandTime = now;
1161
1162
  client.commandCount = 0;
1162
1163
  }
1163
- if (client.commandCount > 200) {
1164
+ const limit = this.options.floodLimit ?? 200;
1165
+ if (client.commandCount > limit) {
1164
1166
  console.warn(`Client ${client.index} kicked for command flooding (count: ${client.commandCount})`);
1165
1167
  this.dropClient(client);
1166
1168
  continue;