3 #include <server/autocvars.qh>
4 #include <server/miscfunctions.qh>
6 string GameLog_ProcessIP(string s)
8 if(!autocvar_sv_eventlog_ipv6_delimiter)
10 return strreplace(":", "_", s);
13 void GameLogEcho(string s)
15 if (autocvar_sv_eventlog_files)
20 int matches = autocvar_sv_eventlog_files_counter + 1;
21 cvar_set("sv_eventlog_files_counter", itos(matches));
22 string fn = ftos(matches);
24 fn = strcat(substring("00000000", 0, 8 - strlen(fn)), fn);
25 fn = strcat(autocvar_sv_eventlog_files_nameprefix, fn, autocvar_sv_eventlog_files_namesuffix);
26 logfile = fopen(fn, FILE_APPEND);
27 fputs(logfile, ":logversion:3\n");
31 if (autocvar_sv_eventlog_files_timestamps)
32 fputs(logfile, strcat(":time:", strftime(true, "%Y-%m-%d %H:%M:%S", "\n", s, "\n")));
34 fputs(logfile, strcat(s, "\n"));
37 if (autocvar_sv_eventlog_console)
39 dedicated_print(strcat(s, "\n"));
46 // will be opened later
51 if (logfile_open && logfile >= 0)