-
Notifications
You must be signed in to change notification settings - Fork 0
/
versioncheck.php
28 lines (25 loc) · 1.26 KB
/
versioncheck.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
// gamename: allow version check for other games
// server: allow different versions for other servers
// port: allow different versions for testserver
// version: the version of the client, so that we can do the decision later
// instead of early at the client release time
if ($_REQUEST['gamename'] == 'stendhal') {
$version = trim(file_get_contents(dirname(__FILE__).'/stendhal.version'));
if ($_REQUEST['version'] < $version) {
echo '<html><body>Your client is out of date. The latest version is '.$version.'. <br>';
echo 'But you are using '.htmlspecialchars($_REQUEST['version']).'. <br>';
echo "Download from https://arianne-project.org";
}
if ($_REQUEST['version'] == '1.01.5') {
echo '<html><body>You are using an outdated test version with disabled updater.<br>';
echo 'Please use the official client to get the bugfix update.';
}
if (strtolower($_REQUEST['server']) == 'stendhalgame.org') {
if ($_REQUEST['version'] >= '2.') {
echo '<html><body>Your client is out of date. The latest version is '.$version.'<br>';
echo 'You are using an unofficial client which will not update automatically.<br>';
echo 'Please download the most recent version of the offical client from https://arianne-project.org ';
}
}
}