2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-01 01:25:38 +03:00

Added listipcfgfile cvar

This commit is contained in:
WPMGPRoSToTeMa 2016-02-04 05:49:45 +03:00
parent 5cfe0d3d4b
commit 6bbce69f04
2 changed files with 13 additions and 0 deletions

View File

@ -464,6 +464,9 @@ extern cvar_t servercfgfile;
extern cvar_t lservercfgfile;
extern cvar_t logsdir;
extern cvar_t bannedcfgfile;
#ifdef REHLDS_FIXES
extern cvar_t listipcfgfile;
#endif
extern decalname_t sv_decalnames[MAX_BASE_DECALS];
extern int sv_decalnamecount;

View File

@ -146,6 +146,9 @@ cvar_t servercfgfile = { "servercfgfile", "server.cfg", 0, 0.0f, NULL };
cvar_t lservercfgfile = { "lservercfgfile", "listenserver.cfg", 0, 0.0f, NULL };
cvar_t logsdir = { "logsdir", "logs", 0, 0.0f, NULL };
cvar_t bannedcfgfile = { "bannedcfgfile", "banned.cfg", 0, 0.0f, NULL };
#ifdef REHLDS_FIXES
cvar_t listipcfgfile = { "listipcfgfile", "listip.cfg", 0, 0.0f, nullptr };
#endif
int g_userid = 1;
@ -6499,7 +6502,11 @@ void SV_ListIP_f(void)
void SV_WriteIP_f(void)
{
char name[MAX_PATH];
#ifdef REHLDS_FIXES
Q_snprintf(name, MAX_PATH, "%s", listipcfgfile.string);
#else
Q_snprintf(name, MAX_PATH, "listip.cfg");
#endif
Con_Printf("Writing %s.\n", name);
FILE *f = FS_Open(name, "wb");
@ -7204,6 +7211,9 @@ void SV_Init(void)
Cvar_RegisterVariable(&lservercfgfile);
Cvar_RegisterVariable(&logsdir);
Cvar_RegisterVariable(&bannedcfgfile);
#ifdef REHLDS_FIXES
Cvar_RegisterVariable(&listipcfgfile);
#endif
Cvar_RegisterVariable(&sv_rcon_minfailures);
Cvar_RegisterVariable(&sv_rcon_maxfailures);
Cvar_RegisterVariable(&sv_rcon_minfailuretime);