private static void LogonRequestCallback(Client pClient, Header pHeader, LogonRequest pLogonRequest) { Account account = AccountCache.RetrieveAccountByEmail(pLogonRequest.Email); if (account == null) { pClient.PermittedServices.Clear(); pClient.ImportedServices.Clear(); pClient.SendAuthenticationClientLogonComplete(new LogonResult(EErrorCode.LoginInformationWasIncorrect)); return; } }
public static void OnLogonRequest(Client pClient, Header pHeader, MemoryStream pData) { LogonRequest logonRequest = new LogonRequest(); if (!logonRequest.Read(pData) || !logonRequest.HasEmail) return; Program.AddCallback(() => LogonRequestCallback(pClient, pHeader, logonRequest)); }