Esempio n. 1
0
 public static void AddAbuseReport(AbuseReport rpt)
 {
     _log.Warn(rpt);
     AbuseReports.AddFirst(rpt);
     if (AbuseReports.Count > 15)
     {
         AbuseReports.RemoveLast();
     }
 }
Esempio n. 2
0
        public static void ReportPlayer(Character chr, Packet packet)
        {
            var characterId = packet.ReadInt();

            var reported = Server.Instance.GetCharacter(characterId);

            var reason = packet.ReadByte();

            string textReason = "Invalid reason (" + reason + ")";

            switch (reason)
            {
            case 0: textReason = "hacking"; break;

            case 1: textReason = "botting"; break;

            case 2: textReason = "scamming"; break;

            case 3: textReason = "fAKE gm"; break;

            case 4: textReason = "harassment"; break;

            case 5: textReason = "advertising"; break;
            }

            if (reported != null)
            {
                SendSueResult(reported, SueResults.YouHaveBeenSnitched);
            }
            else
            {
                // Not sending this as we have enough info anyway
                // SendSueResult(chr, SueResults.UnableToLocateTheUser);
            }

            SendSueResult(chr, SueResults.SuccessfullyReported);

            // Store the reasons somewhere...
            var report = new AbuseReport(
                chr.Name,
                chr.ID,
                chr.UserID,
                reported == null ? "null" : reported.Name,
                reported == null ? -1 : reported.ID,
                reported == null ? -1 : reported.UserID,
                chr.MapID,
                reason,
                textReason,
                MasterThread.CurrentDate);

            Server.Instance.ServerTraceDiscordReporter.Enqueue(report.ToString());
            MessagePacket.SendNoticeGMs(report.ToString(), MessagePacket.MessageTypes.Notice);
            ReportManager.AddAbuseReport(report);
        }