summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-16 10:58:33 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-16 10:58:33 -0700
commit566297bd2b1467cf23e88bb2c0ad210b7d5a2ffa (patch)
treed348b71aa76cc14f3cf7d36b1b0067a01d25b493
parent99eac7473eb7a1ee4d45c0f8435a23d07c3a1f0f (diff)
downloadserverdata-566297bd2b1467cf23e88bb2c0ad210b7d5a2ffa.tar.gz
serverdata-566297bd2b1467cf23e88bb2c0ad210b7d5a2ffa.tar.bz2
serverdata-566297bd2b1467cf23e88bb2c0ad210b7d5a2ffa.tar.xz
serverdata-566297bd2b1467cf23e88bb2c0ad210b7d5a2ffa.zip
Make the "mana" client error out during updates
-rw-r--r--world/map/news.php31
1 files changed, 7 insertions, 24 deletions
diff --git a/world/map/news.php b/world/map/news.php
index 33ad6704..dc1c1db2 100644
--- a/world/map/news.php
+++ b/world/map/news.php
@@ -1,9 +1,7 @@
<?php
// configuration variables
-$min_version = '0.5.1';
$min_manaplus = '1.1.2.20';
-$cur_version = '0.6.1';
// utility functions
function failure_headers()
@@ -44,28 +42,13 @@ function handle_tmw($agent)
"##1 TMW Staff\n \n";
}
-function handle_mana($agent, $min_version)
+function handle_mana($agent)
{
- $version_pos = 5;
- $version_end = strpos($agent, ' ');
- $agent_version = substr($agent, $version_pos, $version_end - $version_pos);
- if (version_compare($agent_version, $min_version) < 0)
- {
- failure_headers();
- echo "##1 The client you're using is no longer\n".
- "##1 supported! Please upgrade to ManaPlus\n".
- "##1 http://manaplus.org/\n \n".
- "##1 TMW Staff\n \n";
- }
- else
- {
- common_headers();
- echo "##1 The client you're using is at end of life,\n".
- "##1 and will no longer be supported as of April 8.\n".
- "##1 Please upgrade to ManaPLus\n".
- "##1 http://manaplus.org/\n",
- "##1 TMW Staff\n \n";
- }
+ failure_headers();
+ echo "##1 The client you're using is no longer\n".
+ "##1 supported! Please upgrade to ManaPlus\n".
+ "##1 http://manaplus.org/\n \n".
+ "##1 TMW Staff\n \n";
}
function handle_manaplus($agent, $min_version)
@@ -115,7 +98,7 @@ else if (starts_with($agent, 'Mana'))
}
else if (starts_with($agent, 'Mana/'))
{
- handle_mana($agent, $min_version);
+ handle_mana($agent);
}
else
{