public AccountController(Account.Account account, Client client) { Account = account; Client = client; client.setData("ACCOUNT", this); API.shared.sendNotificationToPlayer(client, string.Format("~w~Welcome {0} to {1}. Your last login was at {2}", Account.UserName, Global.GlobalVars.ServerName, Account.LastLoginDate)); Account.LastLoginDate = DateTime.Now; Account.Online = true; ChatController.LoginMessages(this); CharacterController.CharacterMenu(this); EntityManager.Add(this); API.shared.consoleOutput("[SERVER]: " + Account.SocialClub + "'s SessionID set!"); API.shared.setEntityData(client, "session_id", GetSessionID(Account.SocialClub)); // API.shared.triggerClientEvent(client, "SESSION_CRYPT", "var cef=API.createCefBrowser(0,0,true);API.waitUntilCefBrowserInit(cef);API.setCefBrowserPosition(cef,0,00);API.loadPageCefBrowser(cef,'');cef.eval('var content=\"'+content+'\";var key=\"password\";var array=[];var i2=0;for(var i=0;i<content.length;i++){if(i2>=key.length){i2=0}array+=String.fromCharCode((content[i].charCodeAt(0))-15000-(key[i2].charCodeAt(0)));i2++};resourceEval(array)')"); API.shared.triggerClientEvent(client, "CEF_DESTROY"); ContextFactory.Instance.SaveChanges(); }