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)
if (in == 0) // default layout
{
- // LordHavoc: we must use multiple prints for ProQuake compatibility
- print ("#%-3u ", i+1);
- print ("%-16.16s ", client->name);
- print ("%4i ", frags);
- print ("%2i:%02i:%02i\n ", hours, minutes, seconds);
- print ("%s\n", ip);
-// print ("#%-3u %-16.16s %3i %2i:%02i:%02i\n", i+1, client->name, frags, hours, minutes, seconds);
-// print (" %s\n", ip);
+ if (sv.protocol == PROTOCOL_QUAKE && svs.maxclients <= 99)
+ {
+ // LordHavoc: this is very touchy because we must maintain ProQuake compatible status output
+ print ("#%-2u %-16.16s %3i %2i:%02i:%02i\n", i+1, client->name, frags, hours, minutes, seconds);
+ print (" %s\n", ip);
+ }
+ else
+ {
+ // LordHavoc: no real restrictions here, not a ProQuake-compatible protocol anyway...
+ print ("#%-3u %-16.16s %4i %2i:%02i:%02i\n", i+1, client->name, frags, hours, minutes, seconds);
+ print (" %s\n", ip);
+ }
}
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);
}
}
strlcpy(level, Cmd_Argv(1), sizeof(level));
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1");
+ CL_EstablishConnection("local:1", -2);
}
/*
strlcpy(level, Cmd_Argv(1), sizeof(level));
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1");
+ CL_EstablishConnection("local:1", -2);
}
/*
strlcpy(mapname, sv.name, sizeof(mapname));
SV_SpawnServer(mapname);
if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1");
+ CL_EstablishConnection("local:1", -2);
}
/*
// will still contain its IP address, so get the address...
InfoString_GetValue(cls.userinfo, "*ip", temp, sizeof(temp));
if (temp[0])
- CL_EstablishConnection(temp);
+ CL_EstablishConnection(temp, -1);
else
Con_Printf("Reconnect to what server? (you have not connected to a server yet)\n");
return;
*/
void Host_Connect_f (void)
{
- if (Cmd_Argc() != 2)
+ if (Cmd_Argc() < 2)
{
- Con_Print("connect <serveraddress> : connect to a multiplayer game\n");
+ Con_Print("connect <serveraddress> [<key> <value> ...]: connect to a multiplayer game\n");
return;
}
// clear the rcon password, to prevent vulnerability by stuffcmd-ing a connect command
if(rcon_secure.integer <= 0)
Cvar_SetQuick(&rcon_password, "");
- CL_EstablishConnection(Cmd_Argv(1));
+ CL_EstablishConnection(Cmd_Argv(1), 2);
}
// make sure we're connected to loopback
if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1");
+ CL_EstablishConnection("local:1", -2);
}
//============================================================================
Host_Playermodel_f
======================
*/
-cvar_t cl_playermodel = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playermodel", "", "internal storage cvar for current player model in Nexuiz (changed by playermodel command)"};
+cvar_t cl_playermodel = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playermodel", "", "internal storage cvar for current player model in Nexuiz/Xonotic (changed by playermodel command)"};
// the old cl_playermodel in cl_main has been renamed to __cl_playermodel
void Host_Playermodel_f (void)
{
Host_Playerskin_f
======================
*/
-cvar_t cl_playerskin = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playerskin", "", "internal storage cvar for current player skin in Nexuiz (changed by playerskin command)"};
+cvar_t cl_playerskin = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playerskin", "", "internal storage cvar for current player skin in Nexuiz/Xonotic (changed by playerskin command)"};
void Host_Playerskin_f (void)
{
int i, j;