Command Bug

  • On the 3xP custom map CJ server theres a command that displays all the maps and it lags the server. I've found a few players taking advantage of the bug and spamming it. Me and a friend were in the server alone with one other person and they were spamming it. Their alias was GOLD.

  • I have no idea how this is implemented in 3xP, but here's some background on it, with possible causes and fixes:


    In case the command polls a readdir() thingy, hdd access times might be the blame for this (fix: cache the damn directory at map start)
    In case the command tries to set 64+ cvars at once, a soft overflow might occur (the soft kind of "server command overflow" crash), which will trigger a re-ordering of the messages the server sends to the client
    In case the command tries to set 128+ cvars at once, a hard overflow occurs, and the client will crash out with "server command overflow". Same should happen if someone /rcon say s over 128 messages in a single server frame (should disconnect all players with the command overflow)
    Fix for the cvar stuff should be just a wait 0.05 between every 20 setclientdvar() calls, or query the amount of messages that the server intents to send to a client and adjust your rate accordingly.

  • the command just outputs all maps which are available on the server.

    • The gsm parses the json file with all maps,
    • makes a huge string with all map names,
    • split them in smaller parts (so they will fit in the char limit for /rcon say)
    • send them over /rcon say


    but I can't see any lags on the server, when I use it