Esempio n. 1
0
        public ServerPacket Compose()
        {
            ServerPacket message = new ServerPacket(Outgoing.ModerationIssueInfoMessageComposer);

            message.WriteInteger(this.issue.Id);
            message.WriteInteger(ModerationTicketStates.GetIntFromState(this.issue.State));
            message.WriteInteger(ModerationTicketTypes.GetIntFromType(this.issue.Type));
            message.WriteInteger(this.issue.Category);
            message.WriteInteger((int)UnixTimestamp.Now);
            message.WriteInteger(this.issue.Priority);
            message.WriteInteger(1);             // ??
            message.WriteInteger(this.issue.SenderId);
            message.WriteString(this.issue.SenderUsername);
            message.WriteInteger(this.issue.ReportedId);
            message.WriteString(this.issue.ReportedUsername);
            message.WriteInteger(this.issue.ModId);
            message.WriteString(this.issue.ModUsername);
            message.WriteString(this.issue.Message);
            message.WriteInteger(this.issue.RoomId);
            message.WriteInteger(1);
            message.WriteString("Banned Word");
            message.WriteInteger(0);
            message.WriteInteger(4);
            return(message);
        }
Esempio n. 2
0
        public ServerPacket Compose()
        {
            ServerPacket message = new ServerPacket(Outgoing.ModerationToolMessageComposer);

            if (this.habbo.HasPermission("acc_modtool_ticket_queue"))
            {
                message.WriteInteger(tickets.Count);
                tickets.ForEach(ticket =>
                {
                    message.WriteInteger(ticket.Id);
                    message.WriteInteger(ModerationTicketStates.GetIntFromState(ticket.State));
                    message.WriteInteger(ModerationTicketTypes.GetIntFromType(ticket.Type));
                    message.WriteInteger(ticket.Category);
                    message.WriteInteger((int)UnixTimestamp.Now - ticket.Id);
                    message.WriteInteger(ticket.Priority);
                    message.WriteInteger(1);                     // ??
                    message.WriteInteger(ticket.SenderId);
                    message.WriteString(ticket.SenderUsername);
                    message.WriteInteger(ticket.ReportedId);
                    message.WriteString(ticket.ReportedUsername);
                    message.WriteInteger(ticket.ModId);
                    message.WriteString(ticket.ModUsername);
                    message.WriteString(ticket.Message);
                    message.WriteInteger(ticket.RoomId);
                    message.WriteInteger(0);
                });
            }
            else
            {
                message.WriteInteger(0);
            }

            message.WriteInteger(Alias.Server.ModerationManager.GetPresets("user").Count);
            Alias.Server.ModerationManager.GetPresets("user").ForEach(preset =>
            {
                message.WriteString(preset.Data);
            });

            message.WriteInteger(Alias.Server.ModerationManager.GetPresets("category").Count);
            Alias.Server.ModerationManager.GetPresets("category").ForEach(preset =>
            {
                message.WriteString(preset.Data);
            });

            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_ticket_queue"));         //ticket queue
            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_user_logs"));            //user chatlogs
            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_user_alert"));           //can send caution
            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_user_kick"));            //can send kick
            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_user_ban"));             //can send ban
            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_room_info"));            //room info ??Not sure
            message.WriteBoolean(this.habbo.HasPermission("acc_modtool_room_logs"));            //room chatlogs ??Not sure

            message.WriteInteger(Alias.Server.ModerationManager.GetPresets("room").Count);
            Alias.Server.ModerationManager.GetPresets("room").ForEach(preset =>
            {
                message.WriteString(preset.Data);
            });
            return(message);
        }