using System;
using System.Linq;
using System.Threading;

using FilterAPI.Networking;

using FilterManager.ManagerNetworking;

namespace FilterManager.ManagerHandlers
{
    internal class Manager21Handle
    {
        [ManagerPacketHandler(21, 5)]
        public static void HandleRemoveFriend(ManagerClient ClientSocket, Packet ClientPacket)
        {
            if (ClientSocket.sID != String.Empty)
            {
                String sID = String.Empty;

                if ((sID = ClientPacket.ReadString(16)) != String.Empty)
                {
                    if (Program.SQL.sIDTaken(sID)) { ClientSocket.SendPacketServer(ClientPacket); }
                    else { ClientSocket.Dispose(); }
                }
            }
        }
    }
}
