Browse Source

engine: server: log: allow to disable logaddress without turning off logs completely

pull/2/head
jeefo 1 year ago committed by Alibek Omarov
parent
commit
868d10a842
  1. 14
      engine/server/sv_log.c

14
engine/server/sv_log.c

@ -169,11 +169,21 @@ void SV_SetLogAddress_f( void )
int port; int port;
string addr; string addr;
if( svs.log.net_log && Cmd_Argc() == 2 && !Q_strcmp( Cmd_Argv( 1 ), "off" ))
{
svs.log.net_log = false;
memset( &svs.log.net_address, 0, sizeof( netadr_t ));
Con_Printf( "logaddress: disabled.\n" );
return;
}
if( Cmd_Argc() != 3 ) if( Cmd_Argc() != 3 )
{ {
Con_Printf( "logaddress: usage\nlogaddress ip port\n" ); Con_Printf( "logaddress: usage\nlogaddress < ip port | off >\n" );
if( svs.log.active ) if( svs.log.active && svs.log.net_log )
Con_Printf( "current: %s\n", NET_AdrToString( svs.log.net_address )); Con_Printf( "current: %s\n", NET_AdrToString( svs.log.net_address ));
return; return;

Loading…
Cancel
Save