Exemple #1
0
        public static void AuthChallengeRequest(IAuthClient client, AuthPacketIn packet)
        {
            packet.SkipBytes(6);             // Skip game name and packet size

            client.ClientInfo = ClientInformation.ReadFromPacket(packet);

            if (!WCellInfo.RequiredVersion.IsSupported(client.ClientInfo.Version))
            {
                OnLoginError(client, AccountStatus.WrongBuild);
            }
            else
            {
                string accName = packet.ReadPascalString();

                s_log.Debug(Resources.AccountChallenge, accName);

                client.CurrentUser = accName;

                var banQuery = QueryFactory.CreateResultQuery
                               (
                    () => Ban.GetBan(client.ClientAddress),
                    AuthChallengeRequestCallback,
                    client
                               );

                client.Server.EnqueueTask(banQuery);
            }
        }
        public static void AuthChallengeRequest(IAuthClient client, AuthPacketIn packet)
        {
            client.Info = ClientInformation.ReadFromPacket(packet);

            // Account-names are always sent upper-case by the client (make sure, the tradition is kept alive)
            var accName = packet.ReadPascalString().ToUpper();

            s_log.Debug(resources.AccountChallenge, accName);

            client.AccountName = accName;
            AuthenticationServer.IOQueue.AddMessage(new Message1 <IAuthClient>(client, AuthChallengeRequestCallback));
        }