namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
{
    using Plus;
    using Plus.Communication.Packets.Outgoing.Moderation;
    using Plus.HabboHotel.GameClients;
    using Plus.HabboHotel.Rooms;
    using Plus.HabboHotel.Rooms.Chat.Commands;
    using System;

    internal class ajudaCommand : IChatCommand
    {
        public void Execute(GameClient Session, Room Room, string[] Params)
        {
            if ((Session != null) && (Room != null))  // by Victor MEV
            {
                if (Params.Length == 1)
                {
                    Session.SendWhisper("Coloque uma mensagem, por favor.", 0);
                }
                else if (!PlusEnvironment.Event)
                {
                    TimeSpan span = (TimeSpan)(DateTime.Now - PlusEnvironment.lastEvent);
                    string str = CommandManager.MergeParams(Params, 1);
                    PlusEnvironment.GetGame().GetClientManager().StaffAlert(new BroadcastMessageAlertComposer("Usuario alertou:\r\r" + str + "\r\n :follow " + Session.GetHabbo().Username, ""), 0);
                    PlusEnvironment.lastEvent = DateTime.Now;
                    Session.SendWhisper("Muito Obrigado um staff ou Embaixador vai chegar ai !.", 0);
                }
                else
                {
                    TimeSpan span2 = (TimeSpan)(DateTime.Now - PlusEnvironment.lastEvent);
                    Session.SendWhisper("Espera " + (8 - span2.Minutes) + " para poder enviar outro alerta.", 0);
                }
            }
        }

        public string Description
        {
            get { return "Tem alguma dúvida? chama um Embaixador ou staff."; }

        }


        public string Parameters
        {
            get { return ""; }
        }

        public string PermissionRequired
        {
            get { return "command_sit"; }
        }
    }
}

