private bool ValidateUser(SvManager svManager, ConnectionData connectionData) { if (!svManager.HandleWhitelist(connectionData.username)) { svManager.RegisterFail(connectionData.connection, "Account not whitelisted"); return(false); } // Don't allow multi-boxing, WebAPI doesn't prevent this if (EntityCollections.Accounts.ContainsKey(connectionData.username)) { svManager.RegisterFail(connectionData.connection, "Account still logged in"); return(false); } return(true); }
private bool ValidateUser(SvManager svManager, AuthData authData) { if (!svManager.HandleWhitelist(authData.accountID)) { svManager.RegisterFail(authData.connection, "Account not whitelisted"); return(false); } // Don't allow multi-boxing, WebAPI doesn't prevent this foreach (ShPlayer p in EntityCollections.Humans) { if (p.accountID == authData.accountID) { svManager.RegisterFail(authData.connection, "Account still logged in"); return(false); } } return(true); }