using System;

using FilterAPI.Networking;

using FilterBot.LoginNetworking;

namespace FilterBot.LoginHandlers
{
    internal class Login2Handle
    {
        [LoginPacketHandler(2, 7)]
        public static void HandleSetXor(LoginServer ServerSocket, Packet ServerPacket)
        {
            ServerSocket.Crypto = new FiestaCrypto(Program.Auth, ServerPacket.PacketReader.ReadInt16());

            Program.SendConsoleText(ConsoleColor.Gray, "({0}) received xor {1}.", ServerSocket.sID, ServerSocket.Crypto.Xor);

            GlobalPacket.SendVersion(ServerSocket);
        }
    }
}
