X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fweaponstats.qc;h=a71abe70f347f780f9c8189e7e21501ee785d50a;hb=5a7362e456f39815970f1d71cfc8822446e3cb60;hp=64fdc5bb30faddb767064c406780ec6758dcdd13;hpb=128cea32714586feb51b4a0d78a6bd4e35fef9f2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/weaponstats.qc b/qcsrc/server/weapons/weaponstats.qc index 64fdc5bb3..a71abe70f 100644 --- a/qcsrc/server/weapons/weaponstats.qc +++ b/qcsrc/server/weapons/weaponstats.qc @@ -1,14 +1,10 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../dpdefs/dpextensions.qh" - #include "../../common/urllib.qh" - #include "../../common/weapons/weapons.qh" - #include "weaponstats.qh" - #include "../autocvars.qh" - #include "../defs.qh" -#endif +#include "weaponstats.qh" + +#include +#include +#include "../g_world.qh" + +#include void WeaponStats_Init() { @@ -53,21 +49,21 @@ void WeaponStats_ready(entity fh, entity pass, float status) case URL_READY_CANREAD: // url_fclose is processing, we got a response for writing the data // this must come from HTTP - print("Got response from weapon stats server:\n"); + LOG_INFO("Got response from weapon stats server:\n"); while((s = url_fgets(fh))) - print(" ", s, "\n"); - print("End of response.\n"); + LOG_INFO(" ", s, "\n"); + LOG_INFO("End of response.\n"); url_fclose(fh); break; case URL_READY_CLOSED: // url_fclose has finished - print("Weapon stats written\n"); + LOG_INFO("Weapon stats written\n"); buf_del(weaponstats_buffer); weaponstats_buffer = -1; break; case URL_READY_ERROR: default: - print("Weapon stats writing failed: ", ftos(status), "\n"); + LOG_INFO("Weapon stats writing failed: ", ftos(status), "\n"); buf_del(weaponstats_buffer); weaponstats_buffer = -1; break; @@ -80,7 +76,7 @@ void WeaponStats_Shutdown() return; if(autocvar_sv_weaponstats_file != "") { - url_multi_fopen(autocvar_sv_weaponstats_file, FILE_APPEND, WeaponStats_ready, world); + url_multi_fopen(autocvar_sv_weaponstats_file, FILE_APPEND, WeaponStats_ready, NULL); } else {