io.setBackgroundColor(BasicTerminalIO.BLACK);
String splashPage = getSplashLoader().loadMudSplash();
io.write(splashPage);
io.write("");
ConnectionData connectionData = getConnection().getConnectionData();
io.writeln("term type:" + connectionData.getNegotiatedTerminalType());
try {
lc = new LoginContext("Mud", this);
} catch (SecurityException e) {
logger.error(e, e);
} catch (LoginException e) {
logger.error(e, e);
}
int logins = 0;
for (; logins < 3; logins++) {
try {
lc.login();
break;
} catch (LoginException e) {
logger.error(e, e);
}
}
if (logins < 3) {
if (player != null) {
player.setTerminalOutput(getExtendedTerminalIO());
getObjectRegistry().register(player);
getObjectRegistry().addActivePlayer(this, player);
try {
doMovePlayer(io, player);
} catch (Exception e) {
io.writeln("Eeek you fell into the void!");
getObjectLoader().movePlayerToVoid(player);
logger.error(e, e);
}
HashMap environment = connectionData.getEnvironment();
environment.put("player", player);
environment.put("registry", getObjectRegistry());
environment.put("loginContext", lc);
environment.put("terminalIO", getExtendedTerminalIO());
getConnection().setNextShell(MudShell.BEAN_NAME);