Example #1
0
        public void PickTicket(GameClient Session, uint TicketId)
        {
            SupportTicket Ticket = this.GetTicket(TicketId);

            if (Ticket != null && Ticket.Status == TicketStatus.OPEN)
            {
                Ticket.Pick(Session.GetHabbo().Id, true);
                this.SendTicketToModerators(Ticket);
            }
        }
Example #2
0
        public void LoadPendingTickets(DatabaseClient class6_0)
        {
            Logging.Write("Loading Current Help Tickets..");
            DataTable dataTable = class6_0.ReadDataTable("SELECT Id,score,type,status,sender_id,reported_id,moderator_id,message,room_id,room_name,timestamp FROM moderation_tickets WHERE status = 'open' OR status = 'picked'");

            if (dataTable != null)
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    SupportTicket @class = new SupportTicket((uint)dataRow["Id"], (int)dataRow["score"], (int)dataRow["type"], (uint)dataRow["sender_id"], (uint)dataRow["reported_id"], (string)dataRow["message"], (uint)dataRow["room_id"], (string)dataRow["room_name"], (double)dataRow["timestamp"], (uint)dataRow["moderator_id"]);
                    if (dataRow["status"].ToString().ToLower() == "picked")
                    {
                        @class.Pick((uint)dataRow["moderator_id"], false);
                    }
                    this.Tickets.Add(@class);
                }
                Logging.WriteLine("completed!");
            }
        }
Example #3
0
        public void LoadPendingTickets(DatabaseClient class6_0)
		{
			Logging.Write("Loading Current Help Tickets..");
			DataTable dataTable = class6_0.ReadDataTable("SELECT Id,score,type,status,sender_id,reported_id,moderator_id,message,room_id,room_name,timestamp FROM moderation_tickets WHERE status = 'open' OR status = 'picked'");
			if (dataTable != null)
			{
				foreach (DataRow dataRow in dataTable.Rows)
				{
					SupportTicket @class = new SupportTicket((uint)dataRow["Id"], (int)dataRow["score"], (int)dataRow["type"], (uint)dataRow["sender_id"], (uint)dataRow["reported_id"], (string)dataRow["message"], (uint)dataRow["room_id"], (string)dataRow["room_name"], (double)dataRow["timestamp"], (uint)dataRow["moderator_id"]);
					if (dataRow["status"].ToString().ToLower() == "picked")
					{
						@class.Pick((uint)dataRow["moderator_id"], false);
					}
					this.Tickets.Add(@class);
				}
				Logging.WriteLine("completed!");
			}
		}