From: divverent Date: Sun, 3 Oct 2010 13:06:58 +0000 (+0000) Subject: make "status" support IPv6 X-Git-Tag: xonotic-v0.1.0preview~143 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c865f6afd0f87e67f6b8868143edc0bd3760c26f;p=xonotic%2Fdarkplaces.git make "status" support IPv6 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10510 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=ab91734e41c1b02ff74222d17e3e89819c5f06ed --- diff --git a/host_cmd.c b/host_cmd.c index 068caa69..277fc530 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -72,7 +72,7 @@ void Host_Status_f (void) client_t *client; int seconds = 0, minutes = 0, hours = 0, i, j, k, in, players, ping = 0, packetloss = 0; void (*print) (const char *fmt, ...); - char ip[22]; + char ip[48]; // can contain a full length v6 address with [] and a port int frags; if (cmd_source == src_command) @@ -185,11 +185,11 @@ void Host_Status_f (void) } else if (in == 1) // extended layout { - print ("%s%-21s %2i %4i %2i:%02i:%02i %4i #%-3u ^7%s\n", k%2 ? "^3" : "^7", ip, packetloss, ping, hours, minutes, seconds, frags, i+1, client->name); + print ("%s%-47s %2i %4i %2i:%02i:%02i %4i #%-3u ^7%s\n", k%2 ? "^3" : "^7", ip, packetloss, ping, hours, minutes, seconds, frags, i+1, client->name); } else if (in == 2) // reduced layout { - print ("%s%-21s #%-3u ^7%s\n", k%2 ? "^3" : "^7", ip, i+1, client->name); + print ("%s%-47s #%-3u ^7%s\n", k%2 ? "^3" : "^7", ip, i+1, client->name); } }