public void method_3(GameClient Session, int int_0, uint uint_0, string string_0)
 {
     if (Session.GetHabbo().CurrentRoomId > 0u)
     {
         RoomData @class = GoldTree.GetGame().GetRoomManager().method_11(Session.GetHabbo().CurrentRoomId);
         uint uint_ = 0u;
         using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
         {
             class2.AddParamWithValue("message", string_0);
             class2.AddParamWithValue("name", @class.Name);
             class2.ExecuteQuery(string.Concat(new object[]
             {
                 "INSERT INTO moderation_tickets (score,type,status,sender_id,reported_id,moderator_id,message,room_id,room_name,timestamp) VALUES (1,'",
                 int_0,
                 "','open','",
                 Session.GetHabbo().Id,
                 "','",
                 uint_0,
                 "','0',@message,'",
                 @class.Id,
                 "',@name,UNIX_TIMESTAMP())"
             }));
             class2.ExecuteQuery("UPDATE user_info SET cfhs = cfhs + 1 WHERE user_id = '" + Session.GetHabbo().Id + "' LIMIT 1");
             uint_ = (uint)class2.ReadDataRow("SELECT Id FROM moderation_tickets WHERE sender_id = '" + Session.GetHabbo().Id + "' ORDER BY Id DESC LIMIT 1")[0];
         }
         SupportTicket class3 = new SupportTicket(uint_, 1, int_0, Session.GetHabbo().Id, uint_0, string_0, @class.Id, @class.Name, GoldTree.GetUnixTimestamp(), 0u);
         this.Tickets.Add(class3);
         this.method_11(class3);
     }
 }
 public ServerMessage method_21(SupportTicket class111_0, RoomData class27_0, double double_0)
 {
     ServerMessage result;
     using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
     {
         DataTable dataTable = @class.ReadDataTable(string.Concat(new object[]
         {
             "SELECT user_id,user_name,hour,minute,message FROM chatlogs WHERE room_id = '",
             class27_0.Id,
             "' AND timestamp >= '",
             double_0 - 300.0,
             "' AND timestamp < UNIX_TIMESTAMP() ORDER BY timestamp DESC LIMIT 100"
         }));
         ServerMessage Message = new ServerMessage(534u);
         Message.AppendUInt(class111_0.UInt32_0);
         Message.AppendUInt(class111_0.SenderId);
         Message.AppendUInt(class111_0.ReportedId);
         Message.AppendBoolean(class27_0.IsPublicRoom);
         Message.AppendUInt(class27_0.Id);
         Message.AppendStringWithBreak(class27_0.Name);
         if (dataTable != null)
         {
             Message.AppendInt32(dataTable.Rows.Count);
             IEnumerator enumerator = dataTable.Rows.GetEnumerator();
             try
             {
                 while (enumerator.MoveNext())
                 {
                     DataRow dataRow = (DataRow)enumerator.Current;
                     Message.AppendInt32((int)dataRow["hour"]);
                     Message.AppendInt32((int)dataRow["minute"]);
                     Message.AppendUInt((uint)dataRow["user_id"]);
                     Message.AppendStringWithBreak((string)dataRow["user_name"]);
                     Message.AppendStringWithBreak((string)dataRow["message"]);
                 }
                 goto IL_186;
             }
             finally
             {
                 IDisposable disposable = enumerator as IDisposable;
                 if (disposable != null)
                 {
                     disposable.Dispose();
                 }
             }
         }
         Message.AppendInt32(0);
         IL_186:
         result = Message;
     }
     return result;
 }
 public void method_11(SupportTicket class111_0)
 {
     GoldTree.GetGame().GetClientManager().method_22(class111_0.Serialize(), "acc_supporttool");
 }
 public void method_2(DatabaseClient class6_0)
 {
     Logging.smethod_0("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.method_0((uint)dataRow["moderator_id"], false);
             }
             this.Tickets.Add(@class);
         }
         Logging.WriteLine("completed!");
     }
 }
Example #5
0
 public void method_11(SupportTicket class111_0)
 {
     GoldTree.GetGame().GetClientManager().method_22(class111_0.Serialize(), "acc_supporttool");
 }