Skip to content

Commit 23ba92d

Browse files
committed
update JSON include, should resolve #215 ?
1 parent 0e08d6f commit 23ba92d

File tree

4 files changed

+4
-25
lines changed

4 files changed

+4
-25
lines changed

plugins/stac.smx

-823 Bytes
Binary file not shown.

scripting/stac.sp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#pragma semicolon 1
5656
#pragma newdecls required
5757

58-
#define PLUGIN_VERSION "6.3.1"
58+
#define PLUGIN_VERSION "6.3.2"
5959

6060
#define UPDATE_URL "https://raw.githubusercontent.com/sapphonie/StAC-tf2/master/updatefile.txt"
6161

scripting/stac/stac_stocks.sp

-21
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
733733

734734
// empty fields for spacing
735735
JSON_Object spacerField = new JSON_Object();
736-
spacerField.EnableOrderedKeys();
737736
spacerField.SetString("name", " ");
738737
spacerField.SetString("value", " ");
739738
spacerField.SetBool ("inline", false);
@@ -770,7 +769,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
770769
json_escape_string(ClName, sizeof(ClName));
771770

772771
nameField = new JSON_Object();
773-
nameField.EnableOrderedKeys();
774772
nameField.SetString("name", "Player");
775773
nameField.SetString("value", ClName);
776774
nameField.SetBool("inline", true);
@@ -792,7 +790,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
792790
}
793791

794792
steamIDfield = new JSON_Object();
795-
steamIDfield.EnableOrderedKeys();
796793
steamIDfield.SetString("name", "SteamID");
797794
steamIDfield.SetString("value", steamid);
798795
steamIDfield.SetBool ("inline", true);
@@ -801,7 +798,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
801798

802799
// detection / notify fields
803800
JSON_Object detectOrMsgfield = new JSON_Object();
804-
detectOrMsgfield.EnableOrderedKeys();
805801
if (!userid)
806802
{
807803
detectOrMsgfield.SetString("name", "Message");
@@ -823,7 +819,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
823819
if (detections)
824820
{
825821
detectNumfield = new JSON_Object();
826-
detectNumfield.EnableOrderedKeys();
827822
detectNumfield.SetString("name", "Detection #");
828823
detectNumfield.SetInt("value", detections);
829824
detectNumfield.SetBool("inline", true);
@@ -835,14 +830,12 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
835830
GetConVarString(FindConVar("hostname"), hostname, sizeof(hostname));
836831

837832
JSON_Object hostname_field = new JSON_Object();
838-
hostname_field.EnableOrderedKeys();
839833
hostname_field.SetString("name", "Hostname");
840834
hostname_field.SetString("value", hostname);
841835
hostname_field.SetBool ("inline", true);
842836

843837
// server IP - steam:///connect ??
844838
JSON_Object serverip_field = new JSON_Object();
845-
serverip_field.EnableOrderedKeys();
846839
serverip_field.SetString("name", "Server IP");
847840
serverip_field.SetString("value", hostipandport);
848841
serverip_field.SetBool ("inline", true);
@@ -853,14 +846,12 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
853846

854847

855848
JSON_Object demoname_field = new JSON_Object();
856-
demoname_field.EnableOrderedKeys();
857849
demoname_field.SetString("name", "Demo name");
858850
demoname_field.SetString("value", demoname);
859851
demoname_field.SetBool ("inline", true);
860852

861853

862854
JSON_Object demotick_field = new JSON_Object();
863-
demotick_field.EnableOrderedKeys();
864855
demotick_field.SetString("name", "Demo tick");
865856
demotick_field.SetInt ("value", demotick);
866857
demotick_field.SetBool ("inline", true);
@@ -897,14 +888,12 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
897888
}
898889

899890
JSON_Object gametime_field = new JSON_Object();
900-
gametime_field.EnableOrderedKeys();
901891
gametime_field.SetString("name", "Approx server uptime");
902892
gametime_field.SetString("value", tickedTimeStr);
903893
gametime_field.SetBool ("inline", true);
904894

905895

906896
JSON_Object servertick_field = new JSON_Object();
907-
servertick_field.EnableOrderedKeys();
908897
servertick_field.SetString("name", "Server tick");
909898
servertick_field.SetInt ("value", servertick);
910899
servertick_field.SetBool ("inline", true);
@@ -928,14 +917,12 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
928917

929918

930919
JSON_Object discordtimestamp_field = new JSON_Object();
931-
discordtimestamp_field.EnableOrderedKeys();
932920
discordtimestamp_field.SetString("name", "Discord Timestamp");
933921
discordtimestamp_field.SetString("value", discordTimestamp);
934922
discordtimestamp_field.SetBool ("inline", true);
935923

936924

937925
JSON_Object unixtimestamp_field = new JSON_Object();
938-
unixtimestamp_field.EnableOrderedKeys();
939926
unixtimestamp_field.SetString("name", "Unix Timestamp");
940927
unixtimestamp_field.SetInt ("value", unixTimestamp);
941928
unixtimestamp_field.SetBool ("inline", true);
@@ -991,7 +978,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
991978

992979

993980
viewangle_field = new JSON_Object();
994-
viewangle_field.EnableOrderedKeys();
995981
viewangle_field.SetString("name", "viewangle history");
996982
viewangle_field.SetString("value", viewangleHistoryBuf);
997983
viewangle_field.SetBool ("inline", false);
@@ -1020,7 +1006,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
10201006
);
10211007

10221008
clpos_field = new JSON_Object();
1023-
clpos_field.EnableOrderedKeys();
10241009
clpos_field.SetString("name", "eye position history");
10251010
clpos_field.SetString("value", eyeposBuf);
10261011
clpos_field.SetBool ("inline", false);
@@ -1049,7 +1034,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
10491034
);
10501035

10511036
cmdnum_field = new JSON_Object();
1052-
cmdnum_field.EnableOrderedKeys();
10531037
cmdnum_field.SetString("name", "cmdnum history");
10541038
cmdnum_field.SetString("value", cmdnumBuf);
10551039
cmdnum_field.SetBool ("inline", true);
@@ -1079,7 +1063,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
10791063

10801064

10811065
tickcount_field = new JSON_Object();
1082-
tickcount_field.EnableOrderedKeys();
10831066
tickcount_field.SetString("name", "tickcount history");
10841067
tickcount_field.SetString("value", tickcountBuf);
10851068
tickcount_field.SetBool ("inline", true);
@@ -1110,7 +1093,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
11101093

11111094

11121095
buttons_field = new JSON_Object();
1113-
buttons_field.EnableOrderedKeys();
11141096
buttons_field.SetString("name", "buttons history");
11151097
buttons_field.SetString("value", buttonsBuf);
11161098
buttons_field.SetBool ("inline", true);
@@ -1145,7 +1127,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
11451127
);
11461128

11471129
netinfo_field = new JSON_Object();
1148-
netinfo_field.EnableOrderedKeys();
11491130
netinfo_field.SetString("name", "network info");
11501131
netinfo_field.SetString("value", netinfoBuf);
11511132
netinfo_field.SetBool ("inline", false);
@@ -1192,7 +1173,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
11921173

11931174
// embeds header info
11941175
JSON_Object embedsFields = new JSON_Object();
1195-
embedsFields.EnableOrderedKeys();
11961176

11971177
embedsFields.SetObject("fields", fieldArray);
11981178
char notifType[64];
@@ -1219,7 +1199,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0)
12191199

12201200
// root
12211201
JSON_Object rootEmbeds = new JSON_Object();
1222-
rootEmbeds.EnableOrderedKeys();
12231202
rootEmbeds.SetObject("embeds", finalArr);
12241203
rootEmbeds.SetString("avatar_url", "https://i.imgur.com/RKRaLPl.png");
12251204
rootEmbeds.Encode(output, sizeof(output));

updatefile.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
{
55
"Version"
66
{
7-
"Latest" "6.3.1"
7+
"Latest" "6.3.2"
88
}
99

10-
"Notes" "Changes in 6.3.1"
11-
"Notes" "- https://github.com/sapphonie/StAC-tf2/releases/tag/v6.3.1"
10+
"Notes" "Changes in 6.3.2"
11+
"Notes" "- https://github.com/sapphonie/StAC-tf2/releases/tag/v6.3.2"
1212
"Notes" "- Of note - new fog_enable bans by StAC as of 02/18/2025 are invalid and should be deleted, as Valve changed this cvar to default to -1 in this update."
1313
"Notes" "===== StAC is always looking for feedback! Got an issue, request, or wanna discuss? Open a GitHub issue and join the Discord server linked in the README, on GitHub! ====="
1414
"Notes" "===== Thank you for using StAC. -sappho ===== "

0 commit comments

Comments
 (0)