Show correct beginners protection in welcome message

This commit is contained in:
KFCSpike
2013-11-30 19:45:24 +00:00
parent 59926f6102
commit f13a32c2e5
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
Hello %USER%,
Thank you for registering on our server.
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. To not get lost in this devastating battle, you should look for allies even though you are <b>protected by beginner\'s protection for 1 day</b>.
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. To not get lost in this devastating battle, you should look for allies even though you are <b>protected by beginner\'s protection for %PROTECTION% hours</b>.
The taskmaster will help you on your way to establishing your empire with advice, deed and resources (after a few tasks such as finding out the exact duration of your beginner\'s protection). You can find him on the right side of your village. After successfully completing all of his tasks you will be on your own again.
+1
View File
@@ -498,6 +498,7 @@ class Message {
$welcomemsg = preg_replace("'%PLAYERS%'", $database->countUser(), $welcomemsg);
$welcomemsg = preg_replace("'%ALLI%'", $database->countAlli(), $welcomemsg);
$welcomemsg = preg_replace("'%SERVER_NAME%'", SERVER_NAME, $welcomemsg);
$welcomemsg = preg_replace("'%PROTECTION%'", (PROTECTION/3600), $welcomemsg);
$welcomemsg = "[message]".$welcomemsg."[/message]";
return $database->sendMessage($uid, 1, WEL_TOPIC, addslashes($welcomemsg), 0, 0, 0, 0, 0);
}