diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c index bed4524ed..4b4a879e0 100644 --- a/engine/server/sv_client.c +++ b/engine/server/sv_client.c @@ -770,27 +770,21 @@ Returns a pointer to a static char for most likely only printing. */ const char *SV_GetClientIDString( sv_client_t *cl ) { - static char result[MAX_QPATH]; + static char result[MAX_QPATH]; - if( !cl ) return ""; + if( !cl ) + return ""; if( FBitSet( cl->flags, FCL_FAKECLIENT )) - { - Q_strncpy( result, "ID_BOT", sizeof( result )); - } - else if( NET_IsLocalAddress( cl->netchan.remote_address )) - { - Q_strncpy( result, "ID_LOOPBACK", sizeof( result )); - } - else if( sv_lan.value ) - { - Q_strncpy( result, "ID_LAN", sizeof( result )); - } - else - { - Q_snprintf( result, sizeof( result ), "ID_%s", MD5_Print( (byte *)cl->hashedcdkey )); - } + return "ID_BOT"; + + if( NET_IsLocalAddress( cl->netchan.remote_address )) + return "ID_LOOPBACK"; + + if( sv_lan.value ) + return "ID_LAN"; + Q_snprintf( result, sizeof( result ), "ID_%s", MD5_Print( (byte *)cl->hashedcdkey )); return result; }