From a29162ba9ad403e0b3ae68f7823e1a45e5df4456 Mon Sep 17 00:00:00 2001 From: hbeham Date: Fri, 22 Jan 2016 01:06:03 +0100 Subject: [PATCH] - added quakeTV prototype script (can't handle full or password protected servers yet) - /whois: switched back to /players now that QL no longer returns duplicate steam IDs --- readme.md | 5 +++++ source/scripts/quakeTv.js | 4 ---- source/scripts/whois.js | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 625d067..725ca17 100644 --- a/readme.md +++ b/readme.md @@ -14,6 +14,11 @@ c:\program files (x86)\Steam\SteamApps\workshop\content\282440\539252269 Changelog ========= +Version 2.20 +--- +- added quakeTV prototype script (can't handle full or password protected servers yet) +- /whois: switched back to /players now that QL no longer returns duplicate steam IDs + Version 2.19 --- - /whois: switched back to /configstrings to work around the bugged duplicate steamids in /players output diff --git a/source/scripts/quakeTv.js b/source/scripts/quakeTv.js index 3ad3f0f..b84a9c5 100644 --- a/source/scripts/quakeTv.js +++ b/source/scripts/quakeTv.js @@ -127,10 +127,6 @@ var $; setTimeout(function() { $.get("http://localhost:27963/condump", function(condump) { var players = getPlayersFromCondump(condump); - - log("players on server: " + JSON.stringify(players)); - log("best players: " + JSON.stringify(bestPlayers)); - var playersById = players.reduce(function(agg, p) { agg[p.steamid] = p; return agg; diff --git a/source/scripts/whois.js b/source/scripts/whois.js index 1b5fa22..c6b8eb6 100644 --- a/source/scripts/whois.js +++ b/source/scripts/whois.js @@ -45,8 +45,8 @@ Version 1.0 channel.subscribe("cvar.ui_mainmenu", function () { playerCache.timestamp = 0; }); // happens on connect and map change // "/players" would be better, but is currently bugged and shows duplicate steam-ids, so we have to stick with "/configstrings" for now - playerInfoProvider = { condumpMarker: "]\\configstrings", qlCommand: "configstrings", extraQlServlet: "serverinfo", dataHandler: onExtraQLServerInfo }; - //playerInfoProvider = { condumpMarker: "]\\players", qlCommand: "players", extraQlServlet: "condump", dataHandler: onExtraQLCondump }; + //playerInfoProvider = { condumpMarker: "]\\configstrings", qlCommand: "configstrings", extraQlServlet: "serverinfo", dataHandler: onExtraQLServerInfo }; + playerInfoProvider = { condumpMarker: "]\\players", qlCommand: "players", extraQlServlet: "condump", dataHandler: onExtraQLCondump }; echo("^2whois.js installed"); } @@ -209,9 +209,9 @@ Version 1.0 var players = []; var lines = condump.substring(idx).split('\n'); lines.forEach(function(line) { - var match = /^(?:\[\d+:\d\d\.\d+\] )?([ \d]\d) (.) (.+) steam:(\d+)$/.exec(line); + var match = /^(?:\[\d+:\d\d\.\d+\] )?([ \d]\d) (\d+) (.) (.+)$/.exec(line); if (match) - players.push({ clientid: parseInt(match[1].trim()), opflag: match[2], name: match[3], steamid: match[4] }); + players.push({ clientid: parseInt(match[1].trim()), opflag: match[3], name: match[4], steamid: match[2] }); }); return players; }