Added timeout duration in seconds to timeout message.

This commit is contained in:
LevelX2 2013-09-21 19:41:59 +02:00
parent be883d6b70
commit d48a8b35fd

View file

@ -69,6 +69,7 @@ import mage.server.Main;
import mage.server.TableManager;
import mage.server.User;
import mage.server.UserManager;
import mage.server.util.ConfigSettings;
import mage.server.util.Splitter;
import mage.server.util.SystemUtil;
import mage.server.util.ThreadExecutor;
@ -400,7 +401,12 @@ public class GameController implements GameCallback {
public void timeout(UUID userId) {
if (userPlayerMap.containsKey(userId)) {
ChatManager.getInstance().broadcast(chatId, "", game.getPlayer(userPlayerMap.get(userId)).getName() + " has timed out. Auto concede.", MessageColor.BLACK);
;
StringBuilder sb = new StringBuilder(game.getPlayer(userPlayerMap.get(userId)).getName())
.append(" has timed out (player had priority and was not active for ")
.append(ConfigSettings.getInstance().getMaxSecondsIdle())
.append(" seconds ) - Auto concede.");
ChatManager.getInstance().broadcast(chatId, "", sb.toString() , MessageColor.BLACK);
concede(userId);
}
}