engine: server: log: allow to disable logaddress without turning off logs completely
This commit is contained in:
parent
699f3579fe
commit
868d10a842
1 changed files with 12 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue