Ooo, shiny!
- Joined
- Feb 23, 2008
- Messages
- 507
- Reaction score
- 361
boolean allowLogin = true;
ChannelServer channelServer = c.getChannelServer();
WorldChannelInterface worldInterface = channelServer.getWorldInterface();
if (state == MapleClient.LOGIN_SERVER_TRANSITION) {
for (String charName : c.loadCharacterNames(c.getWorld())) {
if (worldInterface.isConnected(charName)) {
allowLogin = false;
break;
}
}
}
WorldChannelInterface worldInterface = channelServer.getWorldInterface();
if (state == MapleClient.LOGIN_SERVER_TRANSITION) {
for (String charName : c.loadCharacterNames(c.getWorld())) {
if (worldInterface.isConnected(charName)) {
System.err.print(charName + " has been unstucked, for bug-testing purposes.");
MapleCharacter player_to_dc = player.getClient().getChannelServer().getPlayerStorage().getCharacterByName(charName);
player_to_dc.getClient().disconnect();
player_to_dc.getClient().getSession().close();
c.getSession().write(MaplePacketCreator.serverNotice(1, "\r\n\r\n\r\n Player was unstuck.\r\n Please re-log"));
player_to_dc.getMap().removePlayer(player_to_dc);
allowLogin = false;
break;
}
}
}
I haven't seen this before, but if you have, please post the thread link .Pretty sure this has been released a long time ago. I've seen it somewhere.
Pretty sure this has been released a long time ago. I've seen it somewhere.
if (worldInterface.isConnected(charName)) {
It's up to the player to keep his information private.you dc the player and them send him a message...?
also you would dc a player even if hes not stuck.
I excuse for the bump but what the hell.
Can someone confirm, that this 'method' is secure and suitable for a mass populated server (not refering to my server, just incase ) :laugh:
And according to me transition ° loggedin 1, people who are stuck have 2 right 0_0?
public static final int LOGIN_NOTLOGGEDIN = 0;
public static final int LOGIN_SERVER_TRANSITION = 1;
public static final int LOGIN_LOGGEDIN = 2;
if (state == MapleClient.LOGIN_SERVER_TRANSITION) {
if (state == MapleClient.LOGIN_LOGGEDIN) {
Err.. 2 is loggedin, and 1 is stuck