multiple characters logged on from one account

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Evilus
Posts: 387
Joined: Mon Jun 09, 2008 6:08 pm

Re: multiple characters logged on from one account

Post by Evilus »

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 :P
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 		{ 
Post Reply