2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-23 09:16:04 +01:00

Print version by _sv_build_info server command

This commit is contained in:
Alibek Omarov 2018-04-23 21:36:59 +03:00
parent e8d13cd0d5
commit 4ef527a92d

View File

@ -107,6 +107,7 @@ SV_RejectConnection
Rejects connection request and sends back a message
================
*/
void SV_RejectConnection( netadr_t from, char *fmt, ... ) _format( 2 );
void SV_RejectConnection( netadr_t from, char *fmt, ... )
{
char text[1024];
@ -1928,6 +1929,18 @@ static qboolean SV_Begin_f( sv_client_t *cl )
return true;
}
/*
==================
SV_SendBuildInfo_f
==================
*/
static void SV_SendBuildInfo_f( sv_client_t *cl )
{
SV_ClientPrintf( cl, "Server running %s %s (build %i-%s, %s-%s)\n",
XASH_ENGINE_NAME, XASH_VERSION, Q_buildnum(), Q_buildcommit(), Q_buildos(), Q_buildarch() );
}
ucmd_t ucmds[] =
{
{ "new", SV_New_f },
@ -1945,6 +1958,7 @@ ucmd_t ucmds[] =
{ "dlfile", SV_DownloadFile_f },
{ "disconnect", SV_Disconnect_f },
{ "userinfo", SV_UpdateUserinfo_f },
{ "_sv_build_info", SV_SendBuildInfo_f },
{ NULL, NULL }
};