diff options
| author | xolatile | 2025-08-07 00:32:29 +0200 |
|---|---|---|
| committer | xolatile | 2025-08-07 00:32:29 +0200 |
| commit | 4c8dfb375b4b30dbb6079f9d68024980d81ffa20 (patch) | |
| tree | d7a8164758e9d5cfc5d5c239bccbe45ad19c9da6 /src/engine/master.cpp | |
| parent | 0a1172b75f571685c264a8b9d8ee224bbf11381f (diff) | |
| download | xolatile-badassbug-4c8dfb375b4b30dbb6079f9d68024980d81ffa20.tar.xz xolatile-badassbug-4c8dfb375b4b30dbb6079f9d68024980d81ffa20.tar.zst | |
More cleanups...
Diffstat (limited to 'src/engine/master.cpp')
| -rw-r--r-- | src/engine/master.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/engine/master.cpp b/src/engine/master.cpp index c1d3e20..92d1b97 100644 --- a/src/engine/master.cpp +++ b/src/engine/master.cpp @@ -20,8 +20,6 @@ #define SERVER_LIMIT 4096 #define SERVER_DUP_LIMIT 10 -FILE *logfile = NULL; - struct userinfo { char *name; void *pubkey; @@ -126,15 +124,15 @@ enet_uint32 servtime = 0; void fatal(const char *fmt, ...) { va_list args; va_start(args, fmt); - vfprintf(logfile, fmt, args); - fputc('\n', logfile); + vfprintf(stdout, fmt, args); + fputc('\n', stdout); va_end(args); exit(EXIT_FAILURE); } void conoutfv(int type, const char *fmt, va_list args) { - vfprintf(logfile, fmt, args); - fputc('\n', logfile); + vfprintf(stdout, fmt, args); + fputc('\n', stdout); } void purgeclient(int n) { @@ -570,9 +568,7 @@ int main(int argc, char **argv) { defformatstring(cfgname, "%smaster.cfg", dir); path(logname); path(cfgname); - logfile = fopen(logname, "a"); - if(!logfile) logfile = stdout; - setvbuf(logfile, NULL, _IOLBF, BUFSIZ); + setvbuf(stdout, NULL, _IOLBF, BUFSIZ); signal(SIGUSR1, reloadsignal); setupserver(port, ip); for(;;) { |
