Fix for offline traders after server restart.
This commit is contained in:
parent
abf364f1d0
commit
b5a8fae87a
@ -557,12 +557,23 @@ public class LoginServerThread extends Thread
|
|||||||
* Kick player for the given account.
|
* Kick player for the given account.
|
||||||
* @param account the account
|
* @param account the account
|
||||||
*/
|
*/
|
||||||
public void doKickPlayer(String account)
|
private void doKickPlayer(String account)
|
||||||
{
|
{
|
||||||
final L2GameClient client = _accountsInGameServer.get(account);
|
final L2GameClient client = _accountsInGameServer.get(account);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
if (client.isDetached())
|
||||||
|
{
|
||||||
|
if (client.getActiveChar() != null)
|
||||||
|
{
|
||||||
|
client.getActiveChar().deleteMe();
|
||||||
|
}
|
||||||
|
sendLogout(account);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
||||||
|
}
|
||||||
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
|||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
// exploit prevention, should not happens in normal way
|
// exploit prevention, should not happens in normal way
|
||||||
|
if (player.isOnlineInt() == 1)
|
||||||
|
{
|
||||||
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
||||||
|
}
|
||||||
Disconnection.of(player).defaultSequence(false);
|
Disconnection.of(player).defaultSequence(false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -557,12 +557,23 @@ public class LoginServerThread extends Thread
|
|||||||
* Kick player for the given account.
|
* Kick player for the given account.
|
||||||
* @param account the account
|
* @param account the account
|
||||||
*/
|
*/
|
||||||
public void doKickPlayer(String account)
|
private void doKickPlayer(String account)
|
||||||
{
|
{
|
||||||
final L2GameClient client = _accountsInGameServer.get(account);
|
final L2GameClient client = _accountsInGameServer.get(account);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
if (client.isDetached())
|
||||||
|
{
|
||||||
|
if (client.getActiveChar() != null)
|
||||||
|
{
|
||||||
|
client.getActiveChar().deleteMe();
|
||||||
|
}
|
||||||
|
sendLogout(account);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
||||||
|
}
|
||||||
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
|||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
// exploit prevention, should not happens in normal way
|
// exploit prevention, should not happens in normal way
|
||||||
|
if (player.isOnlineInt() == 1)
|
||||||
|
{
|
||||||
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
||||||
|
}
|
||||||
Disconnection.of(player).defaultSequence(false);
|
Disconnection.of(player).defaultSequence(false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -560,12 +560,23 @@ public class LoginServerThread extends Thread
|
|||||||
* Kick player for the given account.
|
* Kick player for the given account.
|
||||||
* @param account the account
|
* @param account the account
|
||||||
*/
|
*/
|
||||||
public void doKickPlayer(String account)
|
private void doKickPlayer(String account)
|
||||||
{
|
{
|
||||||
final L2GameClient client = _accountsInGameServer.get(account);
|
final L2GameClient client = _accountsInGameServer.get(account);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
if (client.isDetached())
|
||||||
|
{
|
||||||
|
if (client.getActiveChar() != null)
|
||||||
|
{
|
||||||
|
client.getActiveChar().deleteMe();
|
||||||
|
}
|
||||||
|
sendLogout(account);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
||||||
|
}
|
||||||
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
|||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
// exploit prevention, should not happens in normal way
|
// exploit prevention, should not happens in normal way
|
||||||
|
if (player.isOnlineInt() == 1)
|
||||||
|
{
|
||||||
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
||||||
|
}
|
||||||
Disconnection.of(player).defaultSequence(false);
|
Disconnection.of(player).defaultSequence(false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -560,12 +560,23 @@ public class LoginServerThread extends Thread
|
|||||||
* Kick player for the given account.
|
* Kick player for the given account.
|
||||||
* @param account the account
|
* @param account the account
|
||||||
*/
|
*/
|
||||||
public void doKickPlayer(String account)
|
private void doKickPlayer(String account)
|
||||||
{
|
{
|
||||||
final L2GameClient client = _accountsInGameServer.get(account);
|
final L2GameClient client = _accountsInGameServer.get(account);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
if (client.isDetached())
|
||||||
|
{
|
||||||
|
if (client.getActiveChar() != null)
|
||||||
|
{
|
||||||
|
client.getActiveChar().deleteMe();
|
||||||
|
}
|
||||||
|
sendLogout(account);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
||||||
|
}
|
||||||
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
|||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
// exploit prevention, should not happens in normal way
|
// exploit prevention, should not happens in normal way
|
||||||
|
if (player.isOnlineInt() == 1)
|
||||||
|
{
|
||||||
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
||||||
|
}
|
||||||
Disconnection.of(player).defaultSequence(false);
|
Disconnection.of(player).defaultSequence(false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -560,12 +560,23 @@ public class LoginServerThread extends Thread
|
|||||||
* Kick player for the given account.
|
* Kick player for the given account.
|
||||||
* @param account the account
|
* @param account the account
|
||||||
*/
|
*/
|
||||||
public void doKickPlayer(String account)
|
private void doKickPlayer(String account)
|
||||||
{
|
{
|
||||||
final L2GameClient client = _accountsInGameServer.get(account);
|
final L2GameClient client = _accountsInGameServer.get(account);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
if (client.isDetached())
|
||||||
|
{
|
||||||
|
if (client.getActiveChar() != null)
|
||||||
|
{
|
||||||
|
client.getActiveChar().deleteMe();
|
||||||
|
}
|
||||||
|
sendLogout(account);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
||||||
|
}
|
||||||
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
|||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
// exploit prevention, should not happens in normal way
|
// exploit prevention, should not happens in normal way
|
||||||
|
if (player.isOnlineInt() == 1)
|
||||||
|
{
|
||||||
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
||||||
|
}
|
||||||
Disconnection.of(player).defaultSequence(false);
|
Disconnection.of(player).defaultSequence(false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -560,12 +560,23 @@ public class LoginServerThread extends Thread
|
|||||||
* Kick player for the given account.
|
* Kick player for the given account.
|
||||||
* @param account the account
|
* @param account the account
|
||||||
*/
|
*/
|
||||||
public void doKickPlayer(String account)
|
private void doKickPlayer(String account)
|
||||||
{
|
{
|
||||||
final L2GameClient client = _accountsInGameServer.get(account);
|
final L2GameClient client = _accountsInGameServer.get(account);
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
{
|
||||||
|
if (client.isDetached())
|
||||||
|
{
|
||||||
|
if (client.getActiveChar() != null)
|
||||||
|
{
|
||||||
|
client.getActiveChar().deleteMe();
|
||||||
|
}
|
||||||
|
sendLogout(account);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
ACCOUNTING_LOGGER.info("Kicked by login, " + client);
|
||||||
|
}
|
||||||
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
client.close(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_LOGGED_IN_TO_TWO_PLACES_IF_YOU_SUSPECT_ACCOUNT_THEFT_WE_RECOMMEND_CHANGING_YOUR_PASSWORD_SCANNING_YOUR_COMPUTER_FOR_VIRUSES_AND_USING_AN_ANTI_VIRUS_SOFTWARE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
|||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
// exploit prevention, should not happens in normal way
|
// exploit prevention, should not happens in normal way
|
||||||
|
if (player.isOnlineInt() == 1)
|
||||||
|
{
|
||||||
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
LOGGER.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
|
||||||
|
}
|
||||||
Disconnection.of(player).defaultSequence(false);
|
Disconnection.of(player).defaultSequence(false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user