Re: multiple characters logged on from one account
Posted: Tue Dec 22, 2009 5:35 pm
sorry for bumping but I got bored and remembered this old topic, I do not recommend this at all but if you still want to test, bellow code should help you. Btw do not forget to add it in config.java file, I just made a change in the controller and in the text file for the sake 
Note: its not tested but should work =)

Note: its not tested but should work =)
Code: Select all
Index: java/config/loginserver.properties===================================================================--- java/config/loginserver.properties (revision 1033)+++ java/config/loginserver.properties (working copy)@@ -136,6 +136,10 @@ # Default: True AutoCreateAccounts = True +# Allow multiple logins on same accounts+# Warning! Not recommended, use at own risk+# Default: False+AllowMultipleLogin = False # --------------------------------------------------------------------------- # Developer Settings
Code: Select all
java/com/*fork*/loginserver/LoginController.java (working copy)@@ -216,24 +216,24 @@ { // login was successful, verify presence on Gameservers ret = AuthLoginResult.ALREADY_ON_GS;- if (!isAccountInAnyGameServer(account))+ if (!Config.ALLOW_MULT_LOGIN) {- // account isnt on any GS verify LS itself- ret = AuthLoginResult.ALREADY_ON_LS;- - // dont allow 2 simultaneous login- synchronized (_loginServerClients)+ if (!isAccountInAnyGameServer(account)) {- if (!_loginServerClients.containsKey(account))- {- _loginServerClients.put(account, client);- ret = AuthLoginResult.AUTH_SUCCESS;- - // remove him from the non-authed list- removeLoginClient(client);- }+ // account isnt on any GS, verify LS itself + ret = AuthLoginResult.ALREADY_ON_LS; } }+ synchronized (_loginServerClients) + {+ if (!_loginServerClients.containsKey(account)) + {+ _loginServerClients.put(account, client); + ret = AuthLoginResult.AUTH_SUCCESS; + // remove him from the non-authed list + removeLoginClient(client); + }+ } } else {