using System;

using FilterAPI.Networking;

using FilterZone.ZoneNetworking;

namespace FilterZone.ZoneHandlers
{
    internal class Zone38Handle
    {
        [ZonePacketHandler(38, 110)]
        public static void HandleGuildStorageOpened(ZoneClient ClientSocket, Packet ServerPacket)
        {
            if (!Program.SQL.HasPermission(ClientSocket.nCharNo, "CanGuildStorage"))
            {
                GlobalPacket.SendCloseGuildStorage(ClientSocket);
                GlobalPacket.SendShoutMessageServer(ClientSocket, "Server", "Sorry \"{0}\", you are not allowed to open your guild's storage.", ClientSocket.sID);
            }
            else { ClientSocket.SendPacketClient(ServerPacket); }
        }
    }
}
