#include "command/common.qh"
#include "constants.qh"
#include "g_hook.qh"
+#include <server/gamelog.qh>
#include "ipban.qh"
#include <server/mutators/_mod.qh>
#include "../common/t_items.qh"
if (server_is_dedicated) print(input);
}
-string GameLog_ProcessIP(string s)
-{
- if(!autocvar_sv_eventlog_ipv6_delimiter)
- return s;
- return strreplace(":", "_", s);
-}
-
-void GameLogEcho(string s)
-{
- string fn;
- int matches;
-
- if (autocvar_sv_eventlog_files)
- {
- if (!logfile_open)
- {
- logfile_open = true;
- matches = autocvar_sv_eventlog_files_counter + 1;
- cvar_set("sv_eventlog_files_counter", itos(matches));
- fn = ftos(matches);
- if (strlen(fn) < 8)
- fn = strcat(substring("00000000", 0, 8 - strlen(fn)), fn);
- fn = strcat(autocvar_sv_eventlog_files_nameprefix, fn, autocvar_sv_eventlog_files_namesuffix);
- logfile = fopen(fn, FILE_APPEND);
- fputs(logfile, ":logversion:3\n");
- }
- if (logfile >= 0)
- {
- if (autocvar_sv_eventlog_files_timestamps)
- fputs(logfile, strcat(":time:", strftime(true, "%Y-%m-%d %H:%M:%S", "\n", s, "\n")));
- else
- fputs(logfile, strcat(s, "\n"));
- }
- }
- if (autocvar_sv_eventlog_console)
- {
- dedicated_print(strcat(s, "\n"));
- }
-}
-
-void GameLogInit()
-{
- logfile_open = 0;
- // will be opened later
-}
-
-void GameLogClose()
-{
- if (logfile_open && logfile >= 0)
- {
- fclose(logfile);
- logfile = -1;
- }
-}
-
entity findnearest(vector point, bool checkitems, vector axismod)
{
vector dist;