]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a mutator hook for handling URIs
authorMario <mario@smbclan.net>
Mon, 8 Feb 2016 00:29:51 +0000 (10:29 +1000)
committerMario <mario@smbclan.net>
Mon, 8 Feb 2016 00:30:08 +0000 (10:30 +1000)
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh

index 9bd602426614ee8107ddf49517e4afc68fa4336d..2a3ef873413981b40c56f0fd8a4b205a91526f61 100644 (file)
@@ -1114,6 +1114,10 @@ void URI_Get_Callback(float id, float status, string data)
                // online ban list
                OnlineBanList_URI_Get_Callback(id, status, data);
        }
+       else if (MUTATOR_CALLHOOK(URI_GetCallback, id, status, data))
+       {
+               // handled by a mutator
+       }
        else
        {
                LOG_INFO("Received HTTP request data for an invalid id ", ftos(id), ".\n");
index 00d2716e4b6e287b5bdb2ffd9d2f0555fb203460..d81b2b1a5b630c62d0edb78e5c1dd94a6cf6a418 100644 (file)
@@ -846,4 +846,15 @@ MUTATOR_HOOKABLE(MonsterModel, EV_MonsterModel);
 float pct_curteam;
 float pct_newteam;
 MUTATOR_HOOKABLE(Player_ChangeTeam, EV_Player_ChangeTeam);
+
+/**/
+#define EV_URI_GetCallback(i, o) \
+    /**/ i(float, uricb_id) \
+    /**/ i(float, uricb_status) \
+    /**/ i(string, uricb_data) \
+    /**/
+float uricb_id;
+float uricb_status;
+string uricb_data;
+MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback);
 #endif