use of jake2.util.Vargs in project narchy by automenta.
the class SV_CCMDS method SV_Status_f.
/*
================
SV_Status_f
================
*/
public static void SV_Status_f() {
int i, j, l;
client_t cl;
String s;
int ping;
if (SV_INIT.svs.clients == null) {
Com.Printf("No server running.\n");
return;
}
Com.Printf("map : " + SV_INIT.sv.name + '\n');
Com.Printf("num score ping name lastmsg address qport \n");
Com.Printf("--- ----- ---- --------------- ------- --------------------- ------\n");
for (i = 0; i < SV_MAIN.maxclients.value; i++) {
cl = SV_INIT.svs.clients[i];
if (0 == cl.state)
continue;
Com.Printf("%3i ", new Vargs().add(i));
Com.Printf("%5i ", new Vargs().add(cl.edict.client.ps.stats[Defines.STAT_FRAGS]));
if (cl.state == Defines.cs_connected)
Com.Printf("CNCT ");
else if (cl.state == Defines.cs_zombie)
Com.Printf("ZMBI ");
else {
ping = cl.ping < 9999 ? cl.ping : 9999;
Com.Printf("%4i ", new Vargs().add(ping));
}
Com.Printf("%s", new Vargs().add(cl.name));
l = 16 - cl.name.length();
for (j = 0; j < l; j++) Com.Printf(" ");
Com.Printf("%7i ", new Vargs().add(SV_INIT.svs.realtime - cl.lastmessage));
s = NET.AdrToString(cl.netchan.remote_address);
Com.Printf(s);
l = 22 - s.length();
for (j = 0; j < l; j++) Com.Printf(" ");
Com.Printf("%5i", new Vargs().add(cl.netchan.qport));
Com.Printf("\n");
}
Com.Printf("\n");
}
Aggregations