summaryrefslogtreecommitdiff
path: root/world/map/news.php
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-01-23 18:15:14 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-01-24 08:56:33 -0800
commitae6b9eb2e16b570c39666fb4dea2e9222a3c2d8d (patch)
tree44c2d59c4836d565456174595dc7b4a75d708f76 /world/map/news.php
parent060390c8abeab1ec6bdc7964ed145b7a9ea5403b (diff)
downloadserverdata-ae6b9eb2e16b570c39666fb4dea2e9222a3c2d8d.tar.gz
serverdata-ae6b9eb2e16b570c39666fb4dea2e9222a3c2d8d.tar.bz2
serverdata-ae6b9eb2e16b570c39666fb4dea2e9222a3c2d8d.tar.xz
serverdata-ae6b9eb2e16b570c39666fb4dea2e9222a3c2d8d.zip
Implement news generation
Diffstat (limited to 'world/map/news.php')
-rw-r--r--world/map/news.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/world/map/news.php b/world/map/news.php
index 48f6e28e..23786bb4 100644
--- a/world/map/news.php
+++ b/world/map/news.php
@@ -13,18 +13,26 @@ if (substr($agent, 0, 3) == "TMW" || substr($agent, 0, 4) == "Mana")
file_put_contents($file, '[' . date('H:i') . "] $agent\n", FILE_APPEND);
}
-$min_version = '0.0.29.1';
+$min_version = '0.5.0';
$cur_version = '0.6.1';
-if (substr($agent, 0, 3) == "TMW" and $agent < 'TMW/' . $min_version)
+if (substr($agent, 0, 3) == "TMW")
+{
+ echo "##1 The client you're using is really old!\n",
+ "##1 Please upgrade to a Mana or ManaPlus client.\n",
+ "##1 TMW Staff\n \n";
+}
+
+if (substr($agent, 0, 5) == "Mana/"
+ and $agent < 'Mana/' . $min_version)
{
echo "##1 The client you're using is no longer\n".
"##1 supported! Please upgrade to $min_version or\n".
- "##1 higher!\n \n".
+ "##1 higher, or use ManaPlus!\n \n".
"##1 TMW Staff\n \n";
}
-echo "##9 Latest client version: ##6$cur_version\n \n";
+echo "##9 Latest client version: ##6$cur_version\n##0\n";
print file_get_contents("news.txt");
?>