SessionKey key = new SessionKey(_loginKey1, _loginKey2, _playKey1, _playKey2);
if (Config.DEBUG)
_log.info("DEBUG "+getType()+": user: " + _loginName + " key:" + key);
L2GameClient client = getClient();
// avoid potential exploits
if (client.getAccountName() == null)
{
// Preventing duplicate login in case client login server socket was
// disconnected or this packet was not sent yet
if (LoginServerThread.getInstance().addGameServerLogin(_loginName,client))
{
client.setAccountName(_loginName);
LoginServerThread.getInstance().addWaitingClientAndSendRequest(_loginName, client, key);
}
else
{
client.close((L2GameServerPacket) null);
}
}
}