Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New library changes

  • Loading branch information...
commit e90b03c5237687e0c039e48dbc0b58d39551c4f9 1 parent 182f86a
@riemers authored
View
3  .gitmodules
@@ -1,6 +1,3 @@
-[submodule "steam-condenser"]
- path = steam-condenser
- url = git://github.com/koraktor/steam-condenser-php.git
[submodule "lib/twitter"]
path = lib/twitter
url = git://github.com/tijsverkoyen/TwitterOAuth.git
View
2  addserver.php
@@ -2,7 +2,7 @@
include("config.php");
include("lib/functions.php");
-require_once 'steam-condenser/lib/steam-condenser.php';
+require_once 'lib/steam-condenser/lib/steam-condenser.php';
$start = head();
View
2  adminlogs.php
@@ -2,7 +2,7 @@
include("config.php");
include("lib/functions.php");
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($table) or die(mysql_error());
View
2  dbplugins.php
@@ -1,7 +1,7 @@
<?php
include("config.php");
include("lib/functions.php");
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($table) or die(mysql_error());
View
2  gametypes.php
@@ -2,7 +2,7 @@
include("config.php");
include("lib/functions.php");
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
$start = head();
View
2  maps.php
@@ -2,7 +2,7 @@
// Be sure that the paths are correct
include("config.php");
include("lib/functions.php");
-require_once 'steam-condenser/lib/steam-condenser.php';
+require_once 'lib/steam-condenser/lib/steam-condenser.php';
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($table) or die(mysql_error());
View
2  players.php
@@ -2,7 +2,7 @@
// Be sure that the paths are correct
include("config.php");
include("lib/functions.php");
-require_once 'steam-condenser/lib/steam-condenser.php';
+require_once 'lib/steam-condenser/lib/steam-condenser.php';
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($table) or die(mysql_error());
View
2  rcon.php
@@ -2,7 +2,7 @@
include( "config.php" );
include( "lib/functions.php" );
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
error_reporting( E_ALL ); //} no error will slip past unnoticed
ini_set( "display_errors", 1) ;
View
56 servers.php
@@ -2,7 +2,7 @@
include("config.php");
include("lib/functions.php");
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
define("CLI", !isset($_SERVER['HTTP_USER_AGENT']));
function mysql_query_trace($query) {
@@ -75,16 +75,8 @@ function checkversion() {
$twitter->setOAuthToken("$OAuthToken");
$twitter->setOAuthTokenSecret("$OAuthTokenSecret");
- $gametypes = gametypes();
- foreach (array_keys($gametypes) as $game) {
-
- $master = new MasterServer(MasterServer::SOURCE_MASTER_SERVER);
- try {
- $challenge = $master->getChallenge();
- }
- catch(Exception $e) {
- echo "Master server doesn't like to be fingered, perhaps its down?\n";
- }
+ $gametypes = gametypes();
+ foreach (array_keys($gametypes) as $game) {
$version = $gametypes[$game][version];
if (!$version) { $version = "1.0"; }
@@ -94,22 +86,24 @@ function checkversion() {
print "$game for $version\n"; // simple feedback part if needed
+ try {
+ $game = SteamGame::checkUpToDate($appid, $version);
+ } catch(Exception $e) {
+ echo "Seems $appid with version $version doesn't like to be probed\n";
+ echo "Setting gametype as 'up to date' , dont want to start stuff without proper knowledge\n";
+ $game = "1";
+ }
+
+ if ($game == "1") {
+ echo "Up to date\n";
+ } else {
+ echo "Not up to date\n";
+ }
+
+ unset($game);
+
if ($expired != "yes" ) {
- try {
- $data = array(
- 'challenge' => $challenge,
- 'gamedir' => "$game",
- 'product' => "$game",
- 'version' => "$version"
- );
- $reply = $master->sendHeartBeat($data);
- // print_r($reply);
- if(empty($reply)) {
- next;
- } elseif($reply[sizeof($reply) - 1] instanceof M2S_REQUESTRESTART_Packet) {
- $response = $reply[0]->getMessage(); // see reply of version..
- // print_r($response);
if ($response == "Your server is out of date, please upgrade") {
mysql_query_trace( "UPDATE games SET expired='yes' WHERE shortname = '$game'");
if ($settings['useemail']['config'] == 'yes') {
@@ -124,15 +118,13 @@ function checkversion() {
$connection = array('address' => '$growlip', 'password' => '$growlpass');
$growl->notify($connection, "$type", "UPDATE: $game", "A update for $longname seems to be out, go check out the buzz...");
}
- if ($settings['usetwitter']['config'] == 'yes') {
- $twitter->statusesUpdate("A update for $longname seems to be out, go check out the buzz...");
- }
- }
- }
- } catch(Exception $e) {}
+ if ($settings['usetwitter']['config'] == 'yes') {
+ $twitter->statusesUpdate("A update for $longname seems to be out, go check out the buzz...");
+ }
}
- }
+ }
}
+}
function renewserver( $server, $cmd = false ) {
View
2  singlerestart.php
@@ -1,7 +1,7 @@
<?
include("config.php");
include("lib/functions.php");
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($table) or die(mysql_error());
1  steam-condenser
@@ -1 +0,0 @@
-Subproject commit 698c61ffe38129414c4553c41d7bd17c1e44fac2
View
26 version.php
@@ -1,26 +0,0 @@
-<?php
-
- require_once 'steam-condenser/lib/steam-condenser.php';
-
- $master = new MasterServer(MasterServer::SOURCE_MASTER_SERVER);
- $challenge = $master->getChallenge();
-
- $data = array(
- 'challenge' => $challenge,
- 'gamedir' => "tf",
- 'product' => "tf",
- 'version' => "1.1.3.2"
- );
- $reply = $master->sendHeartBeat($data);
- print_r($reply);
- if(empty($reply)) {
- next;
- echo "no reply";
- } elseif($reply[sizeof($reply) - 1] instanceof M2S_REQUESTRESTART_Packet) {
- $response = $reply[0]->getMessage(); // see reply of version..
- print_r($response);
- if ($response == "Your server is out of date, please upgrade") {
- echo "we got a update";
- }
- }
-?>
View
2  walkserver.php
@@ -2,7 +2,7 @@
include("config.php");
include("lib/functions.php");
- require_once 'steam-condenser/lib/steam-condenser.php';
+ require_once 'lib/steam-condenser/lib/steam-condenser.php';
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($table) or die(mysql_error());
Please sign in to comment.
Something went wrong with that request. Please try again.