char name[MAX_OSPATH];
strlcpy(name, cl_iplog_name.string, sizeof(name));
FS_SetExtension(name, ".log", sizeof (name), IS_HARDENED);
- Cvar_SetQuick(cl_iplog_name, name);
+ Cvar_SetQuick(&cl_iplog_name, name);
}
// TODO: this ought to open the one in the userpath version of the base
// gamedir, not the current gamedir
char name[MAX_OSPATH];
strlcpy(name, cl_iplog_name.string, sizeof(name));
FS_SetExtension(name, ".log", sizeof (name), IS_HARDENED);
- Cvar_SetQuick(cl_iplog_name, name);
+ Cvar_SetQuick(&cl_iplog_name, name);
}
// TODO: this ought to open the one in the userpath version of the base
// gamedir, not the current gamedir
char name[MAX_OSPATH];
strlcpy(name, log_file.string, sizeof(name));
FS_SetExtension(name, ".log", sizeof (name), IS_HARDENED);
- Cvar_SetQuick(log_file, name);
+ Cvar_SetQuick(&log_file, name);
}
logfile = FS_OpenRealFile(log_file.string, "a", false);
Cmd_AddCommand ("pingplreport", Host_PingPLReport_f, "command sent by server containing client ping and packet loss values for scoreboard, triggered by pings command from client (not used by QW servers)");
Cmd_AddCommand ("fixtrans", Image_FixTransparentPixels_f, "change alpha-zero pixels in an image file to sensible values, and write out a new TGA (warning: SLOW)");
-#ifdef ANTICHEAT_UNSAFE
Cmd_AddCommand ("checkmemory", Sys_AntiCheat_CheckMemory_f, "check memory for patterns");
-#endif
Cvar_RegisterVariable (&r_fixtrans_auto);
// call this from main(); if it returns false, exit using return
qboolean Sys_AntiCheat_Init(char **envp);
-#ifdef ANTICHEAT_UNSAFE
typedef enum
{
CHECKMEMORY_N_A,
// dllsubstringmode: false = check only dlls without this substring, true = check only dlls with this substring
Sys_AntiCheat_CheckMemory_Result_t Sys_AntiCheat_CheckMemory(const char *dllsubstring, qboolean dllsubstringmode, const void *pattern, size_t length);
void Sys_AntiCheat_CheckMemory_f(void);
-#endif
#endif
# endif
#endif
-#ifdef ANTICHEAT_UNSAFE
// whole function only exists if anticheat is enabled
Sys_AntiCheat_CheckMemory_Result_t Sys_AntiCheat_CheckMemory(const char *dllsubstring, qboolean dllsubstringmode, const void *pattern, size_t length)
{
+#ifdef ANTICHEAT_UNSAFE
# ifdef __linux__
Sys_AntiCheat_CheckMemory_Result_t ret = CHECKMEMORY_NODLL;
FILE *f = fopen("/proc/self/maps", "r");
# else
return CHECKMEMORY_N_A;
# endif
+#else
+ return CHECKMEMORY_N_A;
+#endif
}
void Sys_AntiCheat_CheckMemory_f(void)
{
break;
}
}
-#endif
qboolean Sys_AntiCheat_Init(char **envp)
{