mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: server: limit status and build info commands only to spawned clients
This commit is contained in:
@@ -2176,6 +2176,9 @@ SV_SendBuildInfo_f
|
||||
*/
|
||||
static qboolean SV_SendBuildInfo_f( sv_client_t *cl )
|
||||
{
|
||||
if( cl->state != cs_spawned )
|
||||
return false;
|
||||
|
||||
SV_ClientPrintf( cl, "Server running " XASH_ENGINE_NAME " " XASH_VERSION " (build %i-%s, %s-%s)\n",
|
||||
Q_buildnum(), g_buildcommit, Q_buildos(), Q_buildarch() );
|
||||
return true;
|
||||
@@ -2192,6 +2195,9 @@ static qboolean SV_ClientStatus_f( sv_client_t *cl )
|
||||
vec3_t origin = { 0 };
|
||||
int clients, bots, i;
|
||||
|
||||
if( cl->state != cs_connected )
|
||||
return false;
|
||||
|
||||
NET_GetLocalAddress( &ip4, &ip6 );
|
||||
if( cl->edict )
|
||||
VectorCopy( cl->edict->v.origin, origin );
|
||||
|
||||
Reference in New Issue
Block a user