Skip to content

Allow passing player names to moderation commands

Hanicef requested to merge Hanicef/SRB2:allow-names-netcommands into next

Intuitively, you'd expect moderation commands that affects players to accept player names. For example, you'd expect to be able to write serverchangeteam Knuckles spectator, and the player Knuckles would be moved to spectators. However, right now, this is not how it works, but instead you have to get their player number from nodes and pass that to the command.

This is how all moderation commands work... except for kick and ban. For some reason, those commands do allow passing a player name and it'll work as expected. I can't see a reason why only those two commands should allow this, so I went ahead and made this patch that allows all commands that takes a player number to also take a player name.

Merge request reports

Loading