Make sure status reply always has at least one space between address and qport, important for ipv6 addresses.

This commit is contained in:
Thilo Schulz 2011-01-25 15:16:50 +00:00
parent 5c0ae99642
commit b179fb087c

View file

@ -1097,20 +1097,31 @@ static void SV_Status_f( void ) {
} }
Com_Printf ("%s", cl->name); Com_Printf ("%s", cl->name);
// TTimo adding a ^7 to reset the color
// NOTE: colored names in status breaks the padding (WONTFIX) // TTimo adding a ^7 to reset the color
Com_Printf ("^7"); // NOTE: colored names in status breaks the padding (WONTFIX)
l = 16 - strlen(cl->name); Com_Printf ("^7");
for (j=0 ; j<l ; j++) l = 14 - strlen(cl->name);
j = 0;
do
{
Com_Printf (" "); Com_Printf (" ");
j++;
} while(j < l);
Com_Printf ("%7i ", svs.time - cl->lastPacketTime ); Com_Printf ("%7i ", svs.time - cl->lastPacketTime );
s = NET_AdrToString( cl->netchan.remoteAddress ); s = NET_AdrToString( cl->netchan.remoteAddress );
Com_Printf ("%s", s); Com_Printf ("%s", s);
l = 22 - strlen(s); l = 22 - strlen(s);
for (j=0 ; j<l ; j++) j = 0;
Com_Printf (" ");
do
{
Com_Printf(" ");
j++;
} while(j < l);
Com_Printf ("%5i", cl->netchan.qport); Com_Printf ("%5i", cl->netchan.qport);