Jump to content
  • 0

Double Login Session Bug.


Question

10 answers to this question

Recommended Posts

  • 0
Posted

Thanks guys, altough I dont know how to apply that bugg i must find some1 to check it . 

I will post feedback soon

/THanks :D

  • 0
Posted

After reconnect to server character cant be load... Bad fix... Please give someone normal fix of this bug..

  • 0
Posted (edited)

SweeTs with this fix, after one login in your char ,and logout you cant login again in your char... Something bad in this code..  I cant find good fix... Im added this... Its good with login, logout... But bugg is still working. Maybe someone know where in there can be mistake ? :(

    public boolean addGameServerLogin(String account, L2GameClient client)  {
        
           L2GameClient savedClient = _accountsInGameServer.get(account);
          
                   if (savedClient != null) {
                   if (savedClient.isDetached()) {
                   if (Config.DEBUG)
                   _log.info("Old Client was disconnected: Offline or OfflineMode --> Login Again");
                   ((FastMap<String, L2GameClient>) _accountsInGameServer).put(account, client);
                   return true;
                   }
                   if (Config.DEBUG)
                   _log.info("Old Client was online --> Close Old Client Connection");
                   savedClient.closeNow();
                   _accountsInGameServer.remove(account);
                   return false;
                   }
                   if (Config.DEBUG)
                   _log.info("Client was not online --> New Client Connection");
                   ((FastMap<String, L2GameClient>) _accountsInGameServer).put(account, client);
                   return true;
                   }
}





    L2GameClient savedClient = _accountsInGameServer.get(account);

    if (savedClient != null) {
        if (savedClient.isDetached()) {
            _log.info("Old Client was disconnected: Offline or OfflineMode --> Login Again [Account: " + account + "]");
            ((FastMap<String, L2GameClient>) _accountsInGameServer).put(
                    account, client);
            return true;
        } else {
            _log.info("Old Client was online --> Close Old Client Connection [Account: " + account + "]");
            savedClient.closeNow();
            _accountsInGameServer.remove(account);
            return false;
        }
    } else {
        _log.info("Client was not online --> New Client Connection [Account: " + account + "]");
        ((FastMap<String, L2GameClient>) _accountsInGameServer).put(
                account, client);
        return true;
    }





IN THIS CODE "ELSE" anything mean or no ? Becouse with else i get yellow code... ???

Edited by koksas
  • 0
Posted (edited)

authlogin founded in l2jserver

// 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);
 }

+    public boolean addGameServerLogin(String account, L2GameClient client) {
+
+        L2GameClient savedClient = _accountsInGameServer.get(account);
+
+        if (savedClient != null) {
+            if (savedClient.isDetached()) {
+                LOGGER.debug("Old Client was disconnected: Offline or OfflineMode --> Login Again [Account: " + account + "]");
+                ((FastMap<String, L2GameClient>) _accountsInGameServer).put(
+                        account, client);
+                return true;
+            } else {
+                LOGGER.debug("Old Client was online --> Close Old Client Connection [Account: " + account + "]");
+                savedClient.closeNow();
+                _accountsInGameServer.remove(account);
+                return false;
+            }
+        } else {
+            LOGGER.debug("Client was not online --> New Client Connection [Account: " + account + "]");
+            ((FastMap<String, L2GameClient>) _accountsInGameServer).put(
+                    account, client);
+            return true;
+        }
+    }

well i found this in the gta version of frozen.. i dont have idea if this works

 

 

also this 

public boolean addGameServerLogin(String account, L2GameClient client) 
 { 
 return _accountsInGameServer.putIfAbsent(account, client) == null; 
}
Edited by te0x
Guest
This topic is now closed to further replies.


  • Posts

    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Okay, I understand. First, to get started by contributing to open projects and learning along the way. Then, when you mention starting my own project privately, do you mean taking a free datapack like L2jMobius and trying to make it functional for an online server? Great, thank you very much — all this information is really helpful. I’ve been reaching out to several server admins here in Argentina, but it seems like none of them have the time or interest to take on an intern or assistant. xd   P.S.: Are you the creator of Hopzone? Brings back memories of when I was a kid, downloading servers at the cyber café. For two dollars, I could spend the whole day playing and eating candy like crazy.   Another question: between L2jMobius, L2jServer, and aCis, which one has ALL of its code free? As you probably noticed, I'm using ChatGPT to help me translate things, lol, and it suggested the following: Project Status Open Source Accepts Juniors? Difficulty L2JMobius Very active Semi-closed Partially (with patches) Medium-High L2JServer Active Fully open Yes (directly on GitHub) Medium aCis Semi-active Unofficial Not very clear Low
    • @Logan22 Are you logan from mmo-dev forum?
  • Topics

×
×
  • Create New...