From 03975c1f5f1d6dd1a859967db2eb0bad38978359 Mon Sep 17 00:00:00 2001 From: KittenTM Date: Sun, 26 Apr 2026 00:38:18 +0200 Subject: [PATCH] fix(emergency): flag any weapons that arent valid & fix weapon IDs --- judd/routes/blacklist.json | 2 +- judd/routes/ids.json | 195 +++++++++++++++++-------------------- judd/routes/post.js | 11 ++- 3 files changed, 101 insertions(+), 107 deletions(-) diff --git a/judd/routes/blacklist.json b/judd/routes/blacklist.json index 236eb65..da31bbb 100644 --- a/judd/routes/blacklist.json +++ b/judd/routes/blacklist.json @@ -1,5 +1,5 @@ { - "weapons": [1000, 1001, 1002, 1003, 1100, 1200, 1800, 1801, 2000, 2001, 2002, 2003, 5000], + "weapons": [], "clothes": [26061, 26062, 26063, 26064, 26065, 26066, 26067, 26068, 26069, 26070, 26071, 26072, 26073, 26074, 26075, 26076, 26077, 26078, 26079, 26080, 26081, 26082, 26083, 26084, 26085, 26086, 26087, 26088, 26089, 26090, 26091, 26092, 26093, 26094, 26095, 26096, 26097, 26098, 26099, 26100, 26101, 26102, 26103, 26104, 26105, 26106, 26107, 26108, 26109, 26110, 26111, 26112, 26113, 26114, 26115, 26116, 26117, 26118, 26119, 26120, 26121, 26122, 26123, 26124, 26125, 26126, 26127, 26128, 26129, 26130, 26131, 26132, 26133, 26134, 26135, 26136], "rules": [-1] } \ No newline at end of file diff --git a/judd/routes/ids.json b/judd/routes/ids.json index 2611607..d85aa45 100644 --- a/judd/routes/ids.json +++ b/judd/routes/ids.json @@ -32,110 +32,97 @@ "15": "Mahi-Mahi Resort (ID=15)" }, "weapons_main": { - "100": "Sploosh-o-matic (ID=100)", - "101": "Neo Sploosh-o-matic (ID=101)", - "102": "Splattershot Jr. (ID=102)", - "103": "Custom Splattershot Jr. (ID=103)", - "104": "Splash-o-matic (ID=104)", - "105": "Neo Splash-o-matic (ID=105)", - "106": "Aerospray MG (ID=106)", - "107": "Aerospray RG (ID=107)", - "108": "Splattershot (ID=108)", - "109": "Tentatek Splattershot (ID=109)", - "110": "Hero Shot Replica (ID=110)", - "111": "Octoshot Replica (ID=111)", - "112": ".52 Gal (ID=112)", - "113": ".52 Gal Deco (ID=113)", - "114": "N-ZAP '85 (ID=114)", - "115": "N-ZAP '89 (ID=115)", - "116": "Splattershot Pro (ID=116)", - "117": "Forge Splattershot Pro (ID=117)", - "118": ".96 Gal (ID=118)", - "119": ".96 Gal Deco (ID=119)", - "120": "Dual Squelcher (ID=120)", - "121": "Custom Dual Squelcher (ID=121)", - "122": "Jet Squelcher (ID=122)", - "123": "Custom Jet Squelcher (ID=123)", - "124": "Luna Blaster (ID=124)", - "125": "Luna Blaster Neo (ID=125)", - "126": "Blaster (ID=126)", - "127": "Custom Blaster (ID=127)", - "128": "Range Blaster (ID=128)", - "129": "Custom Range Blaster (ID=129)", - "130": "Rapid Blaster (ID=130)", - "131": "Rapid Blaster Deco (ID=131)", - "132": "Rapid Blaster Pro (ID=132)", - "133": "Rapid Blaster Pro Deco (ID=133)", - "134": "L-3 Nozzlenose (ID=134)", - "135": "L-3 Nozzlenose D (ID=135)", - "136": "H-3 Nozzlenose (ID=136)", - "137": "H-3 Nozzlenose D (ID=137)", - "138": "Wasabi Splattershot (ID=138)", - "139": "Berry Splattershot Pro (ID=139)", - "140": "Sploosh-o-matic 7 (ID=140)", - "141": "Aerospray PG (ID=141)", - "142": "N-ZAP '83 (ID=142)", - "143": "Grim Range Blaster (ID=143)", - "144": "Cherry H-3 Nozzlenose (ID=144)", - "200": "Carbon Roller (ID=200)", - "201": "Carbon Roller Deco (ID=201)", - "202": "Splat Roller (ID=202)", - "203": "Krak-On Splat Roller (ID=203)", - "204": "Hero Roller Replica (ID=204)", - "205": "Dynamo Roller (ID=205)", - "206": "Gold Dynamo Roller (ID=206)", - "207": "Inkbrush (ID=207)", - "208": "Inkbrush Nouveau (ID=208)", - "209": "Octobrush (ID=209)", - "210": "Octobrush Nouveau (ID=210)", - "211": "Tempered Dynamo Roller (ID=211)", - "212": "Permanent Inkbrush (ID=212)", - "213": "CoroCoro Splat Roller (ID=213)", - "300": "Classic Squiffer (ID=300)", - "301": "New Squiffer (ID=301)", - "302": "Splat Charger (ID=302)", - "303": "Kelp Splat Charger (ID=303)", - "304": "Hero Charger Replica (ID=304)", - "305": "Splatterscope (ID=305)", - "306": "Kelp Splatterscope (ID=306)", - "307": "E-liter 3K (ID=307)", - "308": "Custom E-liter 3K (ID=308)", - "309": "E-liter 3K Scope (ID=309)", - "310": "Custom E-liter 3K Scope (ID=310)", - "311": "Bamboozler 14 Mk I (ID=311)", - "312": "Bamboozler 14 Mk II (ID=312)", - "313": "Fresh Squiffer (ID=313)", - "314": "Bamboozler 14 Mk III (ID=314)", - "315": "Bento Splat Charger (ID=315)", - "316": "Bento Splatterscope (ID=316)", - "400": "Slosher (ID=400)", - "401": "Slosher Deco (ID=401)", - "402": "Tri-Slosher (ID=402)", - "403": "Tri-Slosher Nouveau (ID=403)", - "404": "Sloshing Machine (ID=404)", - "405": "Sloshing Machine Neo (ID=405)", - "406": "Soda Slosher (ID=406)", - "500": "Mini Splatling (ID=500)", - "501": "Zink Mini Splatling (ID=501)", - "502": "Heavy Splatling (ID=502)", - "503": "Heavy Splatling Deco (ID=503)", - "504": "Hydra Splatling (ID=504)", - "505": "Custom Hydra Splatling (ID=505)", - "506": "Refurbished Mini Splatling (ID=506)", - "507": "Heavy Splatling Remix (ID=507)", - "1000": "?Shot_Msn0Lv0 (ID=1000)", - "1001": "?Shot_Msn0Lv1 (ID=1001)", - "1002": "?Shot_Msn0Lv2 (ID=1002)", - "1003": "?Shot_Msn0Lv3 (ID=1003)", - "1100": "?Roller_Mission (ID=1100)", - "1200": "?Charge_Mission (ID=1200)", - "1800": "?BigBall_SpecAdjust01 (ID=1800)", - "1801": "?BigBall_SpecAdjust02 (ID=1801)", - "2000": "?Shot_Rvl0Lv0 (ID=2000)", - "2001": "?Shot_Rvl0Lv1 (ID=2001)", - "2002": "?Shot_Rvl0Lv2 (ID=2002)", - "2003": "?Shot_Rvl0Lv3 (ID=2003)", - "5000": "?Roller_KingSquid (ID=5000)" + "0": "Sploosh-o-matic (ID=0)", + "1": "Neo Sploosh-o-matic (ID=1)", + "10": "Splattershot Jr. (ID=10)", + "11": "Custom Splattershot Jr. (ID=11)", + "20": "Splash-o-matic (ID=20)", + "21": "Neo Splash-o-matic (ID=21)", + "30": "Aerospray MG (ID=30)", + "31": "Aerospray RG (ID=31)", + "40": "Splattershot (ID=40)", + "41": "Tentatek Splattershot (ID=41)", + "45": "Hero Shot Replica (ID=45)", + "46": "Octoshot Replica (ID=46)", + "50": ".52 Gal (ID=50)", + "51": ".52 Gal Deco (ID=51)", + "60": "N-ZAP '85 (ID=60)", + "61": "N-ZAP '89 (ID=61)", + "90": "Splattershot Pro (ID=90)", + "91": "Forge Splattershot Pro (ID=91)", + "70": ".96 Gal (ID=70)", + "71": ".96 Gal Deco (ID=71)", + "80": "Dual Squelcher (ID=80)", + "81": "Custom Dual Squelcher (ID=81)", + "100": "Jet Squelcher (ID=100)", + "101": "Custom Jet Squelcher (ID=101)", + "200": "Luna Blaster (ID=200)", + "201": "Luna Blaster Neo (ID=201)", + "210": "Blaster (ID=210)", + "211": "Custom Blaster (ID=211)", + "220": "Range Blaster (ID=220)", + "221": "Custom Range Blaster (ID=221)", + "230": "Rapid Blaster (ID=230)", + "231": "Rapid Blaster Deco (ID=231)", + "240": "Rapid Blaster Pro (ID=240)", + "241": "Rapid Blaster Pro Deco (ID=241)", + "300": "L-3 Nozzlenose (ID=300)", + "301": "L-3 Nozzlenose D (ID=301)", + "310": "H-3 Nozzlenose (ID=310)", + "311": "H-3 Nozzlenose D (ID=311)", + "42": "Wasabi Splattershot (ID=42)", + "92": "Berry Splattershot Pro (ID=92)", + "2": "Sploosh-o-matic 7 (ID=2)", + "32": "Aerospray PG (ID=32)", + "62": "N-ZAP '83 (ID=62)", + "222": "Grim Range Blaster (ID=222)", + "312": "Cherry H-3 Nozzlenose (ID=312)", + "1000": "Carbon Roller (ID=1000)", + "1001": "Carbon Roller Deco (ID=1001)", + "1010": "Splat Roller (ID=1010)", + "1011": "Krak-On Splat Roller (ID=1011)", + "1013": "Hero Roller Replica (ID=1013)", + "1020": "Dynamo Roller (ID=1020)", + "1021": "Gold Dynamo Roller (ID=1021)", + "1100": "Inkbrush (ID=1100)", + "1101": "Inkbrush Nouveau (ID=1101)", + "1110": "Octobrush (ID=1110)", + "1111": "Octobrush Nouveau (ID=1111)", + "1022": "Tempered Dynamo Roller (ID=1022)", + "1102": "Permanent Inkbrush (ID=1102)", + "1012": "CoroCoro Splat Roller (ID=1012)", + "2000": "Classic Squiffer (ID=2000)", + "2001": "New Squiffer (ID=2001)", + "2010": "Splat Charger (ID=2010)", + "2011": "Kelp Splat Charger (ID=2011)", + "2013": "Hero Charger Replica (ID=2013)", + "2020": "Splatterscope (ID=2020)", + "2021": "Kelp Splatterscope (ID=2021)", + "2030": "E-liter 3K (ID=2030)", + "2031": "Custom E-liter 3K (ID=2031)", + "2040": "E-liter 3K Scope (ID=2040)", + "2041": "Custom E-liter 3K Scope (ID=2041)", + "2050": "Bamboozler 14 Mk I (ID=2050)", + "2051": "Bamboozler 14 Mk II (ID=2051)", + "2002": "Fresh Squiffer (ID=2002)", + "2052": "Bamboozler 14 Mk III (ID=2052)", + "2012": "Bento Splat Charger (ID=2012)", + "2022": "Bento Splatterscope (ID=2022)", + "3000": "Slosher (ID=3000)", + "3001": "Slosher Deco (ID=3001)", + "3010": "Tri-Slosher (ID=3010)", + "3011": "Tri-Slosher Nouveau (ID=3011)", + "3020": "Sloshing Machine (ID=3020)", + "3021": "Sloshing Machine Neo (ID=3021)", + "3002": "Soda Slosher (ID=3002)", + "4000": "Mini Splatling (ID=4000)", + "4001": "Zink Mini Splatling (ID=4001)", + "4010": "Heavy Splatling (ID=4010)", + "4011": "Heavy Splatling Deco (ID=4011)", + "4020": "Hydra Splatling (ID=4020)", + "4021": "Custom Hydra Splatling (ID=4021)", + "4002": "Refurbished Mini Splatling (ID=4002)", + "4012": "Heavy Splatling Remix (ID=4012)" }, "sub_weapons": { "0": "Splat Bomb (ID=0)", diff --git a/judd/routes/post.js b/judd/routes/post.js index aa2777c..fef1834 100644 --- a/judd/routes/post.js +++ b/judd/routes/post.js @@ -63,17 +63,20 @@ router.post('/post', postLimiter, async (request, response, next) => { ...request.resultData }); const offenses = []; + const weaponExists = Object.prototype.hasOwnProperty.call(lookup.weapons_main, String(data.Weapon)); + if (!weaponExists && data.Weapon !== undefined) offenses.push("Invalid Weapon ID"); if ((blacklist.weapons || []).includes(Number(data.Weapon))) offenses.push("weapon"); if ((blacklist.clothes || []).includes(Number(data.Gear_Clothes))) offenses.push("clothes"); if ((blacklist.rules || []).includes(Number(data.Rule))) offenses.push("rule"); if (offenses.length > 0) { - const sWep = offenses.includes("weapon") ? "⭐ " : ""; + const sWep = (offenses.includes("weapon") || offenses.includes("Invalid Weapon ID")) ? "⭐ " : ""; const sClt = offenses.includes("clothes") ? "⭐ " : ""; const sRul = offenses.includes("rule") ? "⭐ " : ""; const embed = new EmbedBuilder() .setTitle(":warning: | Invalid Telemetry received") .setDescription(`## Offending information detected in: ${offenses.join(', ')}`) + .setColor(offenses.includes("Invalid Weapon ID") ? 0xFF9900 : 15158332) .setFields( { name: "User Information:", @@ -82,7 +85,11 @@ router.post('/post', postLimiter, async (request, response, next) => { }, { name: "PID", value: `${data.PId || 'N/A'}`, inline: true }, { name: "Mii Name", value: `${data.MiiName || 'N/A'}`, inline: true }, - { name: "Weapon", value: `${sWep}${lookup.weapons_main[data.Weapon] || data.Weapon || 'N/A'}`, inline: true }, + { + name: "Weapon", + value: `${sWep}${lookup.weapons_main[data.Weapon] || `UNKNOWN ID: ${data.Weapon}`}`, + inline: true + }, { name: "Headgear", value: `${lookup.headgear[data.Gear_Head] || data.Gear_Head || 'N/A'}`, inline: true }, { name: "Clothes", value: `${sClt}${lookup.clothes[data.Gear_Clothes] || data.Gear_Clothes || 'N/A'}`, inline: true }, { name: "Shoes", value: `${lookup.shoes[data.Gear_Shoes] || data.Gear_Shoes || 'N/A'}`, inline: true },