using System;

using FilterAPI.Networking;

using FilterBot.ManagerNetworking;

namespace FilterBot.ManagerHandlers
{
    internal class Manager8Handle
    {
        [ManagerPacketHandler(8, 13)]
        public static void HandleFromWhisperMessage(ManagerServer ServerSocket, Packet ServerPacket)
        {
            String sID = ServerPacket.ReadString(16);
            Byte Color = ServerPacket.PacketReader.ReadByte();
            String Message = ServerPacket.PacketReader.ReadString();

            if (Message.ToLower() == "party")
            {
                GlobalPacket.SendPartyInvite(ServerSocket, sID);
                GlobalPacket.SendWhisperMessageClient(ServerSocket, sID, "I have invited you to join my party!");

                Program.SendConsoleText(ConsoleColor.Gray, "({0}) {1} has requested to join party.", ServerSocket.sID, sID);
            }
        }
    }
}
