public async void OnReportingCheater(ReportingCheaterEventArgs ev)
 {
     if (Instance.Config.EventsToLog.ReportingCheater)
     {
         await Network.SendAsync(new RemoteCommand("log", "reports", string.Format(Language.CheaterReportFilled, ev.Reporter.Nickname, ev.Reporter.Id.ToString(), ev.Reporter.Role.Translate(), ev.Reported.Nickname, ev.Reported.Id.ToString(), ev.Reported.Role.Translate(), ev.Reason))).ConfigureAwait(false);
     }
 }
예제 #2
0
#pragma warning disable SA1600 // Elements should be documented

        public async void OnReportingCheater(ReportingCheaterEventArgs ev)
        {
            if (Instance.Config.EventsToLog.ReportingCheater)
            {
                await Network.SendAsync(new RemoteCommand("log", "reports", string.Format(Language.CheaterReportFilled, ev.Issuer.Nickname, ev.Issuer.UserId, ev.Issuer.Role, ev.Target.Nickname, ev.Target.UserId, ev.Target.Role, ev.Reason))).ConfigureAwait(false);
            }
        }
예제 #3
0
        internal void ReportingCheater(ReportingCheaterEventArgs ev)
        {
            if (Plugin.Instance.Config.ReportingCheater == "")
            {
                return;
            }
            string message = Plugin.Instance.Config.ReportingCheater.Replace("%reason%", ev.Reason.ToString());

            message = message.Replace("%reported%", ev.Reported.ToString());
            message = message.Replace("%reporter%", ev.Reporter.ToString());


            if (Plugin.Instance.Config.debug_to_console)
            {
                Log.Debug(message: "[ " + Plugin.Instance.Config.server_name + "] " + message);
            }
            Plugin.sendWebHook(Plugin.Instance.Config.server_url, message, Plugin.Instance.Config.server_name);
        }
예제 #4
0
        private static bool Prefix(
            CheaterReport __instance,
            GameConsoleTransmission reporter,
            string reporterUserId,
            string reportedUserId,
            ref string reason)
        {
            if (reportedUserId == reporterUserId)
            {
                reporter.SendToClient(__instance.connectionToClient, "You can't report yourself!" + Environment.NewLine, "yellow");
            }

            var ev = new ReportingCheaterEventArgs(API.Features.Player.Get(reporterUserId), API.Features.Player.Get(reportedUserId), ServerConsole.Port, reason);

            Server.OnReportingCheater(ev);

            reason = ev.Reason;

            return(ev.IsAllowed);
        }
예제 #5
0
파일: Server.cs 프로젝트: iRebbok/EXILED
 /// <summary>
 /// Called when a player reports a cheater.
 /// </summary>
 /// <param name="ev">The <see cref="ReportingCheaterEventArgs"/> instance.</param>
 public static void OnReportingCheater(ReportingCheaterEventArgs ev) => ReportingCheater.InvokeSafely(ev);
예제 #6
0
 public void OnReporting(ReportingCheaterEventArgs ev)
 {
     Map.Broadcast(10, $"<size=40><color=lime>{ev.Reporter}</color>님이 <color=red>{ev.Reported}</color>(을)를 신고하였습니다.\n<color=green>사유 : {ev.Reason}</color></size>");
     ev.Reporter.Broadcast(10, $"<size=40>당신은 <color=red>{ev.Reported}</color>(을)를 <color=red>신고</color>\n하였습니다. \n<color=red>신고</color>만으론 부족하기에 <color=red>증거자료</color> 제출을 위해 *HTTPS://discord.gg/7dErEw7* 에 <color=yellow>가입하여</color> <color=red>#신고</color> 채널에 증거를 제출해주시길 바랍니다.</size>");
 }