diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-10-11 15:05:50 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-10-11 15:05:50 +0000 |
commit | d02633af4e780c4b6f6d938c67d84d2c968adb79 (patch) | |
tree | 3379b9615e285346ad6b1f87639912e01ecd44c7 /source/sv_ccmds.c | |
parent | f8abe42a0d1a42653b39f6cf320d3fbdd1279bb3 (diff) |
Major redesign of GTV protocol: added support for persistent GTV connections,
bidirectional pinging, low traffic (`suspended') modes.
HTTP server is now gone (remote console logging is temporary gone too),
custom binary protocol is used for GTV connections now.
MVD client no longer serves other MVD clients, only regular spectators.
Changed FIFO buffers to be regular circular buffers, not BIP-buffers.
Removed `sv_http_*', `sv_console_auth' variables.
Added `sv_mvd_maxclients' variable, `addgtvhost', `delgtvhost' and
`listgtvhosts' commands.
Renamed `sv_mvd_max*' cvars for consistency.
Reset `sv_ghostime' default value back to 6, but changed semantics:
it now waits for any packet from client, not just `begin' packet.
Added `--disable-mvd-server' and `--disable-mvd-client' options to
configure script.
FS_Restart() no longer chokes on real files opened for reading.
Fixed client chat prompt length.
Stubbed out more debugging stuff from dedicated server builds.
Diffstat (limited to 'source/sv_ccmds.c')
-rw-r--r-- | source/sv_ccmds.c | 78 |
1 files changed, 11 insertions, 67 deletions
diff --git a/source/sv_ccmds.c b/source/sv_ccmds.c index fd0550f..a4d4935 100644 --- a/source/sv_ccmds.c +++ b/source/sv_ccmds.c @@ -296,7 +296,7 @@ void SV_Kick_f( void ) { sv_player = NULL; } -static void SV_DumpUdpClients( void ) { +static void SV_DumpClients( void ) { client_t *client; Com_Printf( @@ -304,9 +304,12 @@ static void SV_DumpUdpClients( void ) { "--- ----- ---- ---------------- ------- --------------------- ----- -----\n" ); FOR_EACH_CLIENT( client ) { Com_Printf( "%3i ", client->number ); +#if USE_MVD_CLIENT if( sv.state == ss_broadcast ) { Com_Printf( " " ); - } else { + } else +#endif + { Com_Printf( "%5i ", client->edict->client->ps.stats[STAT_FRAGS] ); } @@ -339,7 +342,7 @@ static void SV_DumpUdpClients( void ) { } -static void SV_DumpUdpVersions( void ) { +static void SV_DumpVersions( void ) { client_t *client; Com_Printf( @@ -353,58 +356,6 @@ static void SV_DumpUdpVersions( void ) { } } -static void SV_DumpTcpClients( void ) { - tcpClient_t *client; - int count; - - Com_Printf( -"num resource buf lastmsg address state\n" -"--- -------------------- --- ------- --------------------- -----\n" ); - count = 0; - LIST_FOR_EACH( tcpClient_t, client, &svs.tcp_client_list, entry ) { - Com_Printf( "%3d %-20.20s %3"PRIz" %7u %-21s ", - count, client->resource ? client->resource : "", - FIFO_Usage( &client->stream.send ), - svs.realtime - client->lastmessage, - NET_AdrToString( &client->stream.address ) ); - - switch( client->state ) { - case cs_zombie: - Com_Printf( "ZMBI " ); - break; - case cs_assigned: - Com_Printf( "ASGN " ); - break; - case cs_connected: - Com_Printf( "CNCT " ); - break; - default: - Com_Printf( "SEND " ); - break; - } - Com_Printf( "\n" ); - - count++; - } -} - -static void SV_DumpTcpVersions( void ) { - tcpClient_t *client; - int count; - - Com_Printf( -"num address user-agent\n" -"--- --------------------- -----------------------------------------\n" ); - - count = 0; - LIST_FOR_EACH( tcpClient_t, client, &svs.tcp_client_list, entry ) { - Com_Printf( "%3i %-21s %-40.40s\n", - count, NET_AdrToString( &client->stream.address ), - client->agent ? client->agent : "" ); - count++; - } -} - /* ================ @@ -425,23 +376,16 @@ static void SV_Status_f( void ) { Com_Printf( "No UDP clients.\n" ); } else { if( Cmd_Argc() > 1 ) { - SV_DumpUdpVersions(); + SV_DumpVersions(); } else { - SV_DumpUdpClients(); + SV_DumpClients(); } } Com_Printf( "\n" ); - if( LIST_EMPTY( &svs.tcp_client_list ) ) { - Com_Printf( "No TCP clients.\n" ); - } else { - if( Cmd_Argc() > 1 ) { - SV_DumpTcpVersions(); - } else { - SV_DumpTcpClients(); - } - } - Com_Printf( "\n" ); +#if USE_MVD_SERVER + SV_MvdStatus_f(); +#endif } /* |