Exemple #1
0
        public void PickTicket(GameClient Session, int TicketId)
        {
            SupportTicket ticket = this.GetTicket(TicketId);

            if (ticket == null || ticket.Status != TicketStatus.OPEN)
            {
                return;
            }
            ticket.Pick(Session.GetHabbo().Id, true);
            SendTicketToModerators(ticket);
        }
Exemple #2
0
        internal void PickTicket(GameClient Session, uint TicketId)
        {
            SupportTicket Ticket = GetTicket(TicketId);

            if (Ticket == null || Ticket.Status != TicketStatus.OPEN)
            {
                return;
            }

            Ticket.Pick(Session.GetHabbo().Id, true);
            SendTicketToModerators(Ticket);
        }
Exemple #3
0
 public void LoadPendingTickets()
 {
     using (IQueryAdapter dbClient = ButterflyEnvironment.GetDatabaseManager().GetQueryReactor())
     {
         dbClient.SetQuery("SELECT * FROM moderation_tickets WHERE status = 'open'");
         DataTable table = dbClient.GetTable();
         if (table == null)
         {
             return;
         }
         foreach (DataRow dataRow in table.Rows)
         {
             SupportTicket supportTicket = new SupportTicket(Convert.ToInt32(dataRow["id"]), (int)dataRow["score"], (int)dataRow["type"], Convert.ToInt32(dataRow["sender_id"]), Convert.ToInt32(dataRow["reported_id"]), (string)dataRow["message"], Convert.ToInt32(dataRow["room_id"]), (string)dataRow["room_name"], (double)dataRow["timestamp"], "", "", "");
             if (dataRow["status"].ToString().ToLower() == "picked")
             {
                 supportTicket.Pick(Convert.ToInt32(dataRow["moderator_id"]), false);
             }
             this.Tickets.Add(supportTicket);
         }
     }
 }