Skip to content

Commit

Permalink
- added quakeTV prototype script (can't handle full or password prote…
Browse files Browse the repository at this point in the history
…cted servers yet)

- /whois: switched back to /players now that QL no longer returns duplicate steam IDs
  • Loading branch information
PredatH0r committed Jan 22, 2016
1 parent f33d8f1 commit a29162b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions source/scripts/quakeTv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions source/scripts/whois.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a29162b

Please sign in to comment.