/// <summary> /// Updates the AuthServer about the login-status of the account with the given name. /// Accounts that are flagged as logged-in cannot connect again until its unset again. /// Called whenever client connects/disconnects. /// </summary> /// <param name="acc"></param> /// <param name="loggedIn"></param> internal void SetAccountLoggedIn(RealmAccount acc, bool loggedIn) { if (loggedIn) { acc.OnLogin(); } else { acc.OnLogout(); } }
/// <summary> /// Updates the AuthServer about the login-status of the account with the given name. /// Accounts that are flagged as logged-in cannot connect again until its unset again. /// Called whenever client connects/disconnects. /// </summary> /// <param name="acc"></param> /// <param name="loggedIn"></param> internal void SetAccountLoggedIn(RealmAccount acc, bool loggedIn) { if (m_authServiceClient.IsConnected) { if (loggedIn) { acc.OnLogin(); m_authServiceClient.Channel.SetAccountLoggedIn(acc.Name); } else { acc.OnLogout(); IOQueue.AddMessage(new Message1 <RealmAccount>(acc, UnregisterAccount)); m_authServiceClient.Channel.SetAccountLoggedOut(acc.Name); } } }