Пример #1
0
        private static void GetTicketChatlog(Session Session, ClientMessage Message)
        {
            if (!Session.HasRight("moderation_tool"))
            {
                return;
            }

            ModerationTicket Ticket = ModerationTicketManager.GetTicket(Message.PopWiredUInt32());

            if (Ticket == null || Ticket.ModeratorUserId != Session.CharacterId)
            {
                Session.SendData(NotificationMessageComposer.Compose("Ticket not found or ticket is not assigned to you."));
                return;
            }

            RoomInfo Info = null;

            if (Ticket.RoomId > 0)
            {
                Info = RoomInfoLoader.GetRoomInfo(Ticket.RoomId);
            }

            Session.SendData(ModerationTicketChatlogsComposer.Compose(Ticket, Info, ModerationLogs.GetLogsForRoom(Ticket.RoomId,
                                                                                                                  (Ticket.CreatedTimestamp - 600), UnixTimestamp.GetCurrent())));
        }
Пример #2
0
        private static void GetRoomChatlog(Session Session, ClientMessage Message)
        {
            if (!Session.HasRight("moderation_tool"))
            {
                return;
            }

            int  Unknown1 = Message.PopWiredInt32();
            uint RoomId   = Message.PopWiredUInt32();

            RoomInfo Info = RoomInfoLoader.GetRoomInfo(RoomId);

            if (Info == null)
            {
                Session.SendData(NotificationMessageComposer.Compose("Room not found; could not load chatlogs."));
                return;
            }

            Session.SendData(ModerationRoomChatlogsComposer.Compose(Info, ModerationLogs.GetLogsForRoom(RoomId,
                                                                                                        (UnixTimestamp.GetCurrent() - 3600), UnixTimestamp.GetCurrent())));
        }