_log.info("Listening for GameServers on " + Config.GAME_SERVER_LOGIN_HOST + ":" + Config.GAME_SERVER_LOGIN_PORT);
if(Config.IS_LOGIN_TELNET_ENABLED)
{
try
{
statusServer = new Status(Server.MODE_LOGINSERVER);
statusServer.start();
}
catch(IOException e)
{
_log.severe("Failed to start the Telnet Server. Reason: " + e.getMessage());
if(Config.LOGIN_DEBUG)
{
e.printStackTrace();
}
}
}
else
{
_log.info("LoginServer Telnet server is currently disabled.");
}
try
{
SelectorThread.setAntiFlood(Config.ANTIFLOOD_ENABLE);
SelectorThread.setAntiFloodSocketsConf(Config.MAX_UNHANDLED_SOCKETS_PER_IP, Config.UNHANDLED_SOCKET_MIN_TTL);
_selectorThread.openServerSocket(ad, Config.PORT_LOGIN);
}
catch(IOException e)
{
_log.severe("FATAL: Failed to open server socket on " + ad + ":" + Config.PORT_LOGIN + ". Reason: " + e.getMessage());
if(Config.LOGIN_DEBUG)
{
e.printStackTrace();
}
Server.exit(1, "FATAL: Failed to open server socket on " + ad + ":" + Config.PORT_LOGIN + ". Reason: " + e.getMessage());
}
_selectorThread.start();
_log.info("Login Server ready on port " + Config.PORT_LOGIN);
_log.info(IpManager.getInstance().getBannedCount() + " banned IPs defined");
if(Config.COMBO_MODE)
{
try
{
Util.waitForFreePorts(Config.GAMESERVER_HOSTNAME, Config.PORTS_GAME);
if(Config.IS_TELNET_ENABLED)
{
Status _statusServer = new Status(Server.MODE_GAMESERVER);
_statusServer.start();
}
else
{
_log.info("GameServer Telnet server is currently disabled.");
}