]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/weaponstats.qc
Merge branch 'master' into Juhu/strafehud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / weaponstats.qc
index 4e5f347488249f96f1457fffebca51ec1142da16..f774cb05637957d728565817fe76ae42827a32dc 100644 (file)
@@ -1,8 +1,11 @@
 #include "weaponstats.qh"
 
-#include "../g_world.qh"
+#include <server/intermission.qh>
+#include <common/weapons/_all.qh>
+#include <common/stats.qh>
+#include "../world.qh"
 
-#include <common/weapons/all.qh>
+#include <common/weapons/_all.qh>
 
 void WeaponStats_Init()
 {
@@ -47,21 +50,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
-                       LOG_INFO("Got response from weapon stats server:\n");
+                       LOG_INFO("Got response from weapon stats server:");
                        while((s = url_fgets(fh)))
-                               LOG_INFO("  ", s, "\n");
-                       LOG_INFO("End of response.\n");
+                               LOG_INFO("  ", s);
+                       LOG_INFO("End of response.");
                        url_fclose(fh);
                        break;
                case URL_READY_CLOSED:
                        // url_fclose has finished
-                       LOG_INFO("Weapon stats written\n");
+                       LOG_INFO("Weapon stats written");
                        buf_del(weaponstats_buffer);
                        weaponstats_buffer = -1;
                        break;
                case URL_READY_ERROR:
                default:
-                       LOG_INFO("Weapon stats writing failed: ", ftos(status), "\n");
+                       LOG_INFO("Weapon stats writing failed: ", ftos(status));
                        buf_del(weaponstats_buffer);
                        weaponstats_buffer = -1;
                        break;
@@ -74,7 +77,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
        {