using System;

using FilterAPI.Networking;

using FilterBot.ManagerNetworking;

namespace FilterBot.ManagerHandlers
{
    internal class Manager14Handle
    {
        [ManagerPacketHandler(14, 3)]
        public static void HandlePartyInviteReceived(ManagerServer ServerSocket, Packet ServerPacket)
        {
            String sID = ServerPacket.ReadString(16);

            Program.SendConsoleText(ConsoleColor.Gray, "({0}) received party invite from {1}.", ServerSocket.sID, sID);

            GlobalPacket.SendRejectParty(ServerSocket, sID);
            GlobalPacket.SendPartyInvite(ServerSocket, sID);
        }

        [ManagerPacketHandler(14, 71)]
        public static void HandlePartyMemeberOffline(ManagerServer ServerSocket, Packet ServerPacket)
        {
            String sID = ServerPacket.ReadString(16);

            Program.SendConsoleText(ConsoleColor.Gray, "({0}) {1} went offline while in party.", ServerSocket.sID, sID);

            GlobalPacket.SendPartyBan(ServerSocket, sID);
        }
    }
}
