public void Handle(GameClient session, ClientMessage message)
        {
            if (session.GetHabbo().HasPermission("acc_supporttool"))
            {
                int status = message.PopWiredInt32();
                int amount = message.PopWiredInt32();
                for (int i = 0; i < amount; i++)
                {
                    uint ticketId = message.PopWiredUInt();

                    SupportTicket ticket = Skylight.GetGame().GetModerationToolManager().TryGetSupportTicket(ticketId);
                    if (ticket != null && ticket.Status == SupportTicketStatus.Picked && ticket.PickerID == session.GetHabbo().ID)
                    {
                        switch (status)
                        {
                        case 1:     //invalid
                        {
                            ticket.Close(SupportTicketStatus.Invalid, true);
                            break;
                        }

                        case 2:     //abusive
                        {
                            ticket.Close(SupportTicketStatus.Abusive, true);
                            break;
                        }

                        case 3:     //resolved
                        {
                            ticket.Close(SupportTicketStatus.Resolved, true);
                            break;
                        }

                        default:
                        {
                            session.SendNotif("Invalid close status! " + status);
                            return;
                        }
                        }
                        Skylight.GetGame().GetModerationToolManager().SerializeSupportTicketToMods(ticket);

                        GameClient sender = Skylight.GetGame().GetGameClientManager().GetGameClientById(ticket.SenderID);
                        if (sender != null)
                        {
                            ServerMessage message_ = BasicUtilies.GetRevisionServerMessage(Revision.RELEASE63_35255_34886_201108111108);
                            message_.Init(r63aOutgoing.SupportTicketResult);
                            message_.AppendInt32(status);
                            sender.SendMessage(message_);
                        }
                    }
                }
            }
        }
Beispiel #2
0
        public override void HandleMessage(Yupi.Model.Domain.Habbo session, Yupi.Protocol.Buffers.ClientMessage message,
                                           Yupi.Protocol.IRouter router)
        {
            if (!session.Info.HasPermission("fuse_mod"))
            {
                return;
            }

            int result = message.GetInteger();

            message.GetInteger(); // TODO unused

            int ticketId = message.GetInteger();

            SupportTicket ticket = TicketRepository.Find(ticketId);

            TicketCloseReason reason;

            if (ticket != null && TicketCloseReason.TryFromInt32(result, out reason))
            {
                ticket.Close(reason);

                foreach (Habbo staff in ClientManager.GetByPermission("handle_cfh"))
                {
                    staff.Router.GetComposer <ModerationToolIssueMessageComposer>().Compose(staff, ticket);
                }
            }
        }