Search code examples
c#socketscolor-codesquake

string terminated by ^7


I make a rcon request to a quake 3 server in C# using a udp socket and byte arrays for sending and receiving.

Everything works fine except that when I request a server status, the player names strings are all terminated by ^7, like this: DeathMaster^7.

None of the other strings returned by the rcon commands have this problem, so I am baffled as to what could be wrong.

If you know, please let me know.


Solution

  • Nothing is wrong with your code.

    ^7 is a color code used for players to change the color of their names as they appear in onscreen text. In this case, ^7 sets the name to be white.

    If you want to test this for yourself, connect to a server and change your name to something like this: ^3|SO|^7JonSkeet and you'll see a name with multiple colors.

    Many games are built off of the Quake3 engine, and thus they also use a similar system for colorizing names.

    Color codes of Quake3