3 #include <server/main.qh>
5 string GameLog_ProcessIP(string s)
7 if(!autocvar_sv_eventlog_ipv6_delimiter)
9 return strreplace(":", "_", s);
12 void GameLogEcho(string s)
14 if (autocvar_sv_eventlog_files)
19 int matches = autocvar_sv_eventlog_files_counter + 1;
20 cvar_set("sv_eventlog_files_counter", itos(matches));
21 string fn = ftos(matches);
23 fn = strcat(substring("00000000", 0, 8 - strlen(fn)), fn);
24 fn = strcat(autocvar_sv_eventlog_files_nameprefix, fn, autocvar_sv_eventlog_files_namesuffix);
25 logfile = fopen(fn, FILE_APPEND);
26 fputs(logfile, ":logversion:3\n");
30 if (autocvar_sv_eventlog_files_timestamps)
31 fputs(logfile, strcat(":time:", strftime(true, "%Y-%m-%d %H:%M:%S", "\n", s, "\n")));
33 fputs(logfile, strcat(s, "\n"));
36 if (autocvar_sv_eventlog_console)
38 dedicated_print(strcat(s, "\n"));
45 // will be opened later
50 if (logfile_open && logfile >= 0)