Browse Source

engine: server: send server info to all master servers

pull/2/head
Alibek Omarov 2 years ago
parent
commit
b3c9637422
  1. 15
      engine/server/sv_main.c

15
engine/server/sv_main.c

@ -714,13 +714,9 @@ Master_Add
*/ */
void Master_Add( void ) void Master_Add( void )
{ {
netadr_t adr;
NET_Config( true, false ); // allow remote NET_Config( true, false ); // allow remote
if( NET_SendToMasters( NS_SERVER, 2, "q\xFF" ))
if( !NET_StringToAdr( MASTERSERVER_ADR, &adr )) svs.last_heartbeat = MAX_HEARTBEAT;
Con_Printf( "can't resolve adr: %s\n", MASTERSERVER_ADR );
else NET_SendPacket( NS_SERVER, 2, "q\xFF", adr );
} }
/* /*
@ -757,13 +753,8 @@ Informs all masters that this server is going down
*/ */
void Master_Shutdown( void ) void Master_Shutdown( void )
{ {
netadr_t adr;
NET_Config( true, false ); // allow remote NET_Config( true, false ); // allow remote
while( NET_SendToMasters( NS_SERVER, 2, "\x62\x0A" ));
if( !NET_StringToAdr( MASTERSERVER_ADR, &adr ))
Con_Printf( "can't resolve addr: %s\n", MASTERSERVER_ADR );
else NET_SendPacket( NS_SERVER, 2, "\x62\x0A", adr );
} }
/* /*

Loading…
Cancel
Save