Exemple #1
0
        /// <summary>Handles the AuthCheck packet. Responds with LogonRequest2 packet</summary>
        /// <param name="packet">The packet.</param>
        private void OnAuthCheck(ChatServerPacket packet)
        {
            AuthCheckIn fromServer = new AuthCheckIn(packet);

            LogServer(fromServer.ToString());

            if (!fromServer.IsSuccessful())
            {
                Fail(FailureArgs.FailureTypes.FailedAuthCheck, fromServer.ToString());
                return;
            }

            LogonRequest2Out toServer = new LogonRequest2Out(settings.Username, settings.Password, clientToken, serverToken);

            SendPacket(toServer);
        }
        /// <summary>Handles the AuthCheck packet. Responds with LogonRequest2 packet</summary>
        /// <param name="packet">The packet.</param>
        private void OnAuthCheck(ChatServerPacket packet)
        {
            AuthCheckIn fromServer = new AuthCheckIn(packet);
            LogServer(fromServer.ToString());

            if (!fromServer.IsSuccessful())
            {
                Fail(FailureArgs.FailureTypes.FailedAuthCheck, fromServer.ToString());
                return;
            }

            LogonRequest2Out toServer = new LogonRequest2Out(settings.Username, settings.Password, clientToken, serverToken);
            SendPacket(toServer);
        }