Permalink
Browse files

Added steamrep to player list on live servers

  • Loading branch information...
1 parent 6eda01e commit 29023385702560e4675f9546065a12feceaffe42 @riemers committed Apr 29, 2012
Showing with 20 additions and 8 deletions.
  1. +1 −0 adminlogs.php
  2. +5 −4 lib/functions.php
  3. +12 −2 players.php
  4. +2 −2 servers.php
View
1 adminlogs.php
@@ -91,6 +91,7 @@
preg_match_all($pattern, $message, $matches);
$steamid2 = $matches[0][1];
+ $statsinfo[3] = "right";
if ($steamid != $steamid2 && $steamid2 != "") {
$matchprofile = SteamId::convertSteamIdToCommunityId($steamid2);
$statsinfo[2] = $steamid2;
View
9 lib/functions.php
@@ -52,7 +52,7 @@ function head ($extra = '') {
<a href="servers.php">Servers</a>
| <a href="plugins.php">Active Plugins</a>
| <a href="dbplugins.php">Plugin Checker</a>
- | <a href="gametypes.php">Game Types</a>
+ | <a href="gametypes.php">Game Types</a>
<?php
include("config.php");
@@ -167,9 +167,10 @@ function getserver($serverid) {
function getstatsurl($statsinfo)
{
- if ( $statsinfo[2] == "BOT") { return; }
- if ($statsinfo[0] == 'hlxce') { $url = "<a href=\"" . $statsinfo[1] . "/hlstats.php?mode=search&q=" . $statsinfo[2] . "&st=uniqueid&game=\"><img src=\"images/stats_ico.png\" align=\"right\" /></a>"; return $url; }
- if ($statsinfo[0] == 'gameme') { $url = "<a href=\"" . $statsinfo[1] . "/search?q=" . $statsinfo[2] . "&si=uniqueid&rc=all&x=40&y=8\"><img src=\"images/stats_ico.png\" align=\"right\" /></a>"; return $url; }
+ if ( $statsinfo[2] == "BOT" || $statsinfo[2] == "ERROR" ) { return; }
+ if ($statsinfo[0] == 'hlxce') { $url = "<a href=\"" . $statsinfo[1] . "/hlstats.php?mode=search&q=" . $statsinfo[2] . "&st=uniqueid&game=\"><img src=\"images/stats_ico.png\" style=\"float:" . $statsinfo[3] . "\"></a>"; return $url; }
+ if ($statsinfo[0] == 'gameme') { $url = "<a href=\"" . $statsinfo[1] . "/search?q=" . $statsinfo[2] . "&si=uniqueid&rc=all&x=40&y=8\"><img src=\"images/stats_ico.png\" style=\"float:" . $statsinfo[3] . "\"></a>"; return $url; }
+ if ($statsinfo[0] == 'steamrep') { $url = "<a href=\"" . $statsinfo[1] . "/" . $statsinfo[2] . "\"><img src=\"images/sr_ico.jpg\" width=\"18\" height=\"18\" style=\"float:" . $statsinfo[3] . "\"></a>"; return $url; }
}
function isSteamIdValid($steamId)
View
14 players.php
@@ -51,7 +51,7 @@
}
echo "<table>";
-echo "<tr bgcolor=FF8C00><th width=14%>Name</th><th width=25%>Score</th><th width=14%>Ping</th><th width=14%>steamid</th><th width=14%>connect time</th><th width=14%>state</th><th width=14%>ip</th></tr>";
+echo "<tr bgcolor=FF8C00><th width=14%>Name</th><th width=25%>Score</th><th width=14%>Ping</th><th width=14%>steamid</th><th width=14%>connect time</th><th width=14%>state</th><th width=14%>ip</th><th width=14% nowrap=nowrap>Quick Info</th></tr>";
$i=0;
foreach($players as $player) {
$steamid = $player->getsteamid();
@@ -60,7 +60,7 @@
if ($i%2 == 0) { echo "<tr class=d0>"; $i++; }
else { echo "<tr class=d1>"; $i++; }
if ($name == "") { echo "<td>New player connecting</td>"; }
-else { echo "<td>{$player->getName()}" . getstatsurl($statsinfo) . "</td>"; }
+else { echo "<td>{$player->getName()}</td>"; }
echo "<td>{$player->getScore()}</td>";
echo "<td>{$player->getPing()}</td>";
try {
@@ -77,6 +77,16 @@
echo "<td>$time</td>";
echo "<td>{$player->getstate()}</td>";
echo "<td>{$player->getipaddress()}</td>";
+ $statsinfo[3] = "none";
+ $steamrep[0] = "steamrep";
+ $steamrep[1] = "http://www.steamrep.com/profiles";
+ $steamrep[2] = "$profile";
+ $steamrep[3] = "none";
+ $t1 = getstatsurl($statsinfo);
+ $t2 = getstatsurl($steamrep);
+
+ $tt = "$t1 $t2";
+ echo "<td>$tt</td>";
echo "</tr>";
}
echo "</table>";
View
4 servers.php
@@ -597,9 +597,9 @@ function setwindow($url , $title) {
}
$playersColor = '#f60';
- if ($currentplayers >= $maxplayers) {
+ if ($currentplayers / $maxplayers > 0.65) {
$playersColor = '#390';
- } elseif ($currentplayers / $maxplayers < 0.25) {
+ } elseif ($currentplayers / $maxplayers < 0.15) {
$playersColor = '#f00';
}

0 comments on commit 2902338

Please sign in to comment.