Иконка ресурса

FREE IQReportSystem : 2.13.74 2.13.74

Нет прав для скачивания
C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using ConVar;
using Newtonsoft.Json.Linq;
using Oxide.Core.Libraries.Covalence;
using Network;
using Facepunch.Utility;
using System.Collections.Generic;
using Oxide.Core;
using Oxide.Game.Rust.Cui;
using UnityEngine.Networking;
using System;
using UnityEngine;
using Net = Network.Net;
using UnityEngine.UI;
using System.Collections;
using Newtonsoft.Json;
using Object = System.Object;
using System.Linq;
using System.Text.RegularExpressions;
using Oxide.Core.Libraries;
using Oxide.Core.Plugins;
using Time = UnityEngine.Time;
using System.Text;
namespace Oxide.Plugins {
    [Info("IQReportSystem", "Sempai#3239", "2.13.74")]
    [Description("One love IQReportSystem")]
    internal class IQReportSystem : RustPlugin {
        private class Configuration {
            [JsonProperty(LanguageEn ? "Setting up compatibility with IQReportSystemr" : "Настройка совместимостей с IQReportSystem")]
            public References ReferenceSettings = new References();
            [JsonProperty(LanguageEn ? "Color setting" : "Настройка цветов")]
            public Colors ColorsSettings = new Colors();
            [JsonProperty(LanguageEn ? "Setting images" : "Настройка изображений")]
            public Images ImagesSettings = new Images();
            [JsonProperty(LanguageEn ? "List of reports and reasons for blocking" : "Список жалоб и причин блокировки")]
            public List<ReasonReport> ReasonList = new List<ReasonReport>();
            [JsonProperty(LanguageEn ? "Setting up sending complaints via F7 or the RUST game menu" : "Настройка отправки жалоб через F7 или игровое меню RUST")]
            public ReportF7AndGameMenu ReportF7AndGameMenuSettings = new ReportF7AndGameMenu();
            [JsonProperty(LanguageEn ? "Setting up the Player check process" : "Настройка процесса проверки игрока")]
            public CheckController CheckControllerSettings = new CheckController();
            [JsonProperty(LanguageEn ? "Setting up moderator notifications and the maximum number of reports" : "Настройка уведомления модераторов и максимального количества репортов")]
            public ReportContollerModeration ReportContollerModerationSettings = new ReportContollerModeration();
            [JsonProperty(LanguageEn ? "Setting up sending complaints by players" : "Настройка отправки жалоб игроками")]
            public ReportSendController ReportSendControllerSettings = new ReportSendController();
            [JsonProperty(LanguageEn ? "Additional verdict setting" : "Дополнительная настройка вынесения вердикта")]
            public VerdictController VerdictControllerSettings = new VerdictController();
            [JsonProperty(LanguageEn ? "Configuring notifications for all players about actions in the plugin" : "Настройка уведомлений для всех игроков о действиях в плагине")]
            public NotifyChat NotifyChatSettings = new NotifyChat();
            [JsonProperty(LanguageEn ? "Setting up notifications in Discord" : "Настройка уведомлений в Discord")]
            public NotifyDiscord NotifyDiscordSettings = new NotifyDiscord();
            [JsonProperty(LanguageEn ? "Setting up notifications in VK" : "Настройка уведомлений в VK")]
            public NotifyVK NotifyVKSettings = new NotifyVK();
            [JsonProperty(LanguageEn ? "Command to send data when calling for verification (console and chat)" : "Команда для отправки данных при вызове на проверку (консольная и чатовая)")]
            public String CommandForContact;
            internal class VerdictController {
                [JsonProperty(LanguageEn ? "Banned all the `Friends` of a player who has been given a verdict by a moderator (true - yes/false - no)" : "Блокировать всех `Друзей` игрока, которому вынес вердикт модератор (true - да/false - нет)")]
                public Boolean UseBanAllTeam;
                [JsonProperty(LanguageEn ? "Index from the list of complaints when blocking a player's `Friends` (From your list - starts from 0)" : "Индекс из списка жалоб при блокировки `Друзей` игрока  (Из вашего списка - начинается от 0)")]
                public Int32 IndexBanReason;
            }
            internal class CheckController {
                [JsonProperty(LanguageEn ? "Use sound notification for players when calling for verification (true - yes / false - no) [You must upload sound files to the IQSystem/IQReportSystem/Sounds folder]" : "Использовать звуковое оповещение для игроков при вызове на проверку (true - да/false - нет) [Вы должны загрузить файлы со звуком в папку IQSystem/IQReportSystem/Sounds]")]
                public Boolean UseSoundAlert;
                [JsonProperty(LanguageEn ? "Record a demos of the player during his check" : "Записывать демо игрока во время его проверки")]
                public Boolean UseDemo;
                [JsonProperty(LanguageEn ? "Use AFK validation before calling for check (true - yes / false - no)" : "Использовать проверку на AFK перед вызовом на проверку (true - да/false - нет)")]
                public Boolean UseCheckAFK;
                [JsonProperty(LanguageEn ? "Cancel check for a player automatically with saving reports if he left the server for 15 minutes or more (true - yes/false - no)" : "Отменять проверку игроку автоматически с сохранением репортов если он покинул сервер на 15 минут и более (true - да/false - нет)")]
                public Boolean StopCheckLeavePlayer;
                [JsonProperty(LanguageEn ? "Use tracking of crafting of invaders by the player (will notify the moderator about it) (true - yes / false - no)" : "Использовать отслеживание крафта предметов игроком (будет уведомлять модератора об этом) (true - да/false - нет)")]
                public Boolean TrackCrafting;
                [JsonProperty(LanguageEn ? "Use tracking of messages sent to the chat by the player (will notify the moderator about it) (true - yes / false - no)" : "Использовать отслеживание отправки сообщений в чат игроком (будет уведомлять модератора об этом) (true - да/false - нет)")]
                public Boolean TrackChat;
                [JsonProperty(LanguageEn ? "Use player command usage tracking (will notify the moderator about it) (true - yes / false - no)" : "Использовать отслеживание использования команд игроком (будет уведомлять модератора об этом) (true - да/false - нет)")]
                public Boolean TrackCommand;
            }
            internal class ReportContollerModeration {
                [JsonProperty(LanguageEn ? "Maximum number of reports to display the player in the moderator menu and moderator notifications" : "Максимальное количество репортов для отображения игрока в меню модератора и уведомления модератора")]
                public Int32 ReportCountTrigger;
                [JsonProperty(LanguageEn ? "Setting up moderator notifications about the maximum number of player reports" : "Настройка уведомления модератора о максимальном количестве репортов игрока")]
                public AlertModeration AlertModerationSettings = new AlertModeration();
                internal class AlertModeration {
                    [JsonProperty(LanguageEn ? "Notify the moderator that the player has scored the maximum number of reports" : "Уведомлять модератора о том, что игрок набрал максимальное количество репортов")]
                    public Boolean AlertModerator;
                    [JsonProperty(LanguageEn ? "Enable an audio notification to the moderator during the notification of the number of reports" : "Включать звуковое уведомление модератору во время уведомления о количестве репортов")]
                    public Boolean AlertSound;
                    [JsonProperty(LanguageEn ? "The path to the notification sound (this is the path of the prefab of the game - you can see here : https://github.com/OrangeWulf/Rust-Docs/blob/master/Extended/Effects.md)" : "Путь до звука уведомления (это путь префаба игры - посмотреть можно тут : https://github.com/OrangeWulf/Rust-Docs/blob/master/Extended/Effects.md)")]
                    public String PathSound;
                }
            }
            internal class ReportSendController {
                [JsonProperty(LanguageEn ? "Prohibit a player from sending a complaint against one player several times (true - yes/false - no)" : "Запретить игроку несколько раз отправлять жалобу на одного игрока (true - да/false - нет)")]
                public Boolean NoRepeatReport;
                [JsonProperty(LanguageEn ? "Cooldown before sending a complaint to the players (in seconds) (if you don't need a recharge, leave 0)" : "Перезарядка перед отправкой жалобы на игроков (в секундах) (если вам не нужна перезарядка - оставьте 0)")]
                public Int32 CooldownReport;
                [JsonProperty(LanguageEn ? "Use cooldown before sending a complaint only for a repeated complaint against one player (true) otherwise for all players (false)" : "Использовать перезарядку перед отправкой жалобы только на повторную жалобу на одного игрока (true) иначе на всех игроков (false)")]
                public Boolean CooldownRepeatOrAll;
            }
            internal class ReportF7AndGameMenu {
                [JsonProperty(LanguageEn ? "Use sending report via F7 and the RUST game menu (true - yes/false - no)" : "Использовать отправку жалоб через F7 и игровое меню RUST (true - да/false - нет)")]
                public Boolean UseFunction;
                [JsonProperty(LanguageEn ? "Index from the list of complaints when sent via F7 and the RUST game menu (From your list - starts from 0)" : "Индекс из списка жалоб при отправке через F7 и игровое меню RUST (Из вашего списка - начинается от 0)")]
                public Int32 DefaultIndexReason;
            }
            internal class NotifyChat {
                [JsonProperty(LanguageEn ? "Notify players when a moderator has started checking a player (configurable in the language file)" : "Уведомлять игроков о том, что модератор начал проверку игрока (настраивается в языковом файле)")]
                public Boolean UseNotifyCheck;
                [JsonProperty(LanguageEn ? "Notify players when a moderator has finished checking a player (configurable in the language file)" : "Уведомлять игроков о том, что модератор завершил проверку игрока (настраивается в языковом файле)")]
                public Boolean UseNotifyStopCheck;
                [JsonProperty(LanguageEn ? "Notify players that the moderator has completed the verification of the player and issued a verdict (banned) (configurable in the language file)" : "Уведомлять игроков о том, что модератор завершил проверку игрока и вынес вердикт (забанил) (настраивается в языковом файле)")]
                public Boolean UseNotifyVerdictCheck;
            }
            internal class NotifyVK {
                [JsonProperty(LanguageEn ? "Token from the VK group (you can find it in the community settings)" : "Токен от группы ВК (вы можете найти его в настройках сообщества)")]
                public String VKTokenGroup;
                [JsonProperty(LanguageEn ? "ID of the conversation the bot is invited to (countdown starts from 1 - every new conversation +1)" : "ID беседы в которую приглашен бот (отсчет начинается с 1 - каждую новую беседу +1)")]
                public String VKChatID;
            }
            internal class NotifyDiscord {
                [JsonProperty(LanguageEn ? "Set up WebHooks to send to Discord (if you don't need this feature - leave the field blank)" : "Настройка WebHooks для отправки в Discord (если вам не нужна эта функция - оставьте поле пустым)")]
                public Webhooks WebhooksList = new Webhooks();
                internal class Webhooks {
                    internal class TemplatesNotify {
                        [JsonProperty("Webhook")]
                        public String WebhookNotify;
                        [JsonProperty(LanguageEn ? "Discord message color (Can be found on the website - https://old.message.style/dashboard in the JSON section)" : "Цвет сообщения в Discord (Можно найти на сайте - https://old.message.style/dashboard в разделе JSON)")]
                        public Int32 Color;
                        [JsonProperty(LanguageEn ? "Title message" : "Заголовок сообщения")]
                        public String AuthorName;
                        [JsonProperty(LanguageEn ? "Link to the icon for the avatar of the message" : "Ссылка на иконку для аватарки сообщения")]
                        public String IconURL;
                    }
                    [JsonProperty(LanguageEn ? "WebHook : Setting up sending information about the start of a check" : "WebHook : Настройка отправки информации о начале проверки")]
                    public TemplatesNotify NotifyStartCheck = new TemplatesNotify();
                    [JsonProperty(LanguageEn ? "WebHook : Setting up sending information about the stop of a check" : "WebHook : Настройка отправки информации о завершении проверки")]
                    public TemplatesNotify NotifyStopCheck = new TemplatesNotify();
                    [JsonProperty(LanguageEn ? "WebHook : Settings for sending player contact information (when a player sends their Discord)" : "WebHook : Настройка отправки информации о контактах игрока (когда игрок отправляет свой Discord)")]
                    public TemplatesNotify NotifyContacts = new TemplatesNotify();
                    [JsonProperty(LanguageEn ? "WebHook : Setting up sending information about player complaints" : "WebHook : Настройка отправки информации о жалобах игроков")]
                    public TemplatesNotify NotifySendReport = new TemplatesNotify();
                    [JsonProperty(LanguageEn ? "WebHook : Setting up sending information when a player has exceeded the maximum number of complaints" : "WebHook : Настройка отправки информации когда игрок превысил максимальное количество жалоб")]
                    public TemplatesNotify NotifyMaxReport = new TemplatesNotify();
                    [JsonProperty(LanguageEn ? "WebHook : Setting up sending information about changing the status of the player and moderator" : "WebHook : Настройка отправки информации о изменении статуса игрока и модератора")]
                    public TemplatesNotify NotifyStatusPlayerOrModerator = new TemplatesNotify();
                }
            }
            internal class ReasonReport {
                [JsonProperty(LanguageEn ? "Reason" : "Причина")]
                public LangText Title;
                [JsonProperty(LanguageEn ? "The command from your ban system to block the user ({0} - will be replaced by the player's ID)" : "Команда вашей бан-системы на блокировку пользователя ({0} - заменится на ID игрока)")]
                public String BanCommand;
                [JsonProperty(LanguageEn ? "Hide this reason from the player (true) (will only be seen by the moderator when passing a verdict)" : "Скрыть данную причину от игрока (true) (будет видеть только модератор при вынесении вердикта)")]
                public Boolean HideUser;
            }
            internal class Images {
                [JsonProperty(LanguageEn ? "Reports section images" : "Изображения раздела для жалоб")]
                public PlayerListBlock PlayerListBlockSettings = new PlayerListBlock();
                [JsonProperty(LanguageEn ? "Images of the statistics section" : "Изображения раздела статистики")]
                public StatisticsBlock StatisticsBlockSettings = new StatisticsBlock();
                [JsonProperty(LanguageEn ? "Left menu images" : "Изображения левого меню")]
                public LeftBlock LeftBlockSettings = new LeftBlock();
                [JsonProperty(LanguageEn ? "Moderation section images" : "Изображения раздела модерации")]
                public ModerationBlock ModerationBlockSettings = new ModerationBlock();
                [JsonProperty(LanguageEn ? "Moderator menu images when checking" : "Изображения меню модератора при проверки")]
                public ModeratorMenuChecked ModeratorMenuCheckedSettings = new ModeratorMenuChecked();
                [JsonProperty(LanguageEn ? "Images of the player rating menu quality of the moderator's work" : "Изображения меню оценки игроком качество работы модератора")]
                public PlayerMenuRaiting PlayerMenuRaitingSettings = new PlayerMenuRaiting();
                [JsonProperty(LanguageEn ? "PNG of the menu background (1382x950)" : "PNG заднего фона меню (1382x950)")]
                public String Background;
                [JsonProperty(LanguageEn ? "PNG down arrows (page flipping) (10x5)" : "PNG стрелки вниз(перелистывание страниц) (10x5)")]
                public String PageDown;
                [JsonProperty(LanguageEn ? "PNG up arrows (page flipping) (10x5)" : "PNG стрелки вверх(перелистывание страниц) (10x5)")]
                public String PageUp;
                [JsonProperty(LanguageEn ? "PNG icon search (16x16)" : "PNG иконки поиска (16x16)")]
                public String Search;
                [JsonProperty(LanguageEn ? "PNG : Icon for adjusting avatar (64x64)" : "PNG : Иконка для корректировки автарки (64x64)")]
                public String AvatarBlur;
                [JsonProperty(LanguageEn ? "PNG : Icon for moderation verdict or rating (307x36)" : "PNG : Иконка для вердикта модерации или рейтинга (307x36)")]
                public String ReasonModeratorAndRaiting;
                [JsonProperty(LanguageEn ? "PNG : Image on the player's screen with text about the start of the checks (1450x559)" : "PNG : Изображение на экране игрока с текстом о начале проверки (1450x559)")]
                public String PlayerAlerts;
                internal class PlayerMenuRaiting {
                    [JsonProperty(LanguageEn ? "PNG : Menu background when evaluating a reviewer (307x98)" : "PNG : Задний фон меню при оценке проверяющего (307x98)")]
                    public String PlayerMenuRaitingBackground;
                }
                internal class ModeratorMenuChecked {
                    [JsonProperty(LanguageEn ? "PNG : Menu background when checking player (307x148)" : "PNG : Задний фон меню при проверки игрока (307x148)")]
                    public String ModeratorCheckedBackground;
                    [JsonProperty(LanguageEn ? "PNG : End test button (128x40)" : "PNG : Кнопка завершения проверки (128x40)")]
                    public String ModeratorCheckedStopButton;
                    [JsonProperty(LanguageEn ? "PNG : Verdict button (128x40)" : "PNG : Кнопка вердикта (128x40)")]
                    public String ModeratorVerdictButton;
                    [JsonProperty(LanguageEn ? "PNG : `Licenses` icon (if Lumia support is enabled) (16x16)" : "PNG : Иконка `Лицензии` (если включена поддержка Luma) (16x16)")]
                    public String SteamIcoPlayer;
                    [JsonProperty(LanguageEn ? "PNG : `Pirate` icon (if Lumia support is enabled) (16x16)" : "PNG : Иконка `Пират` (если включена поддержка Luma) (16x16)")]
                    public String PirateIcoPlayer;
                }
                internal class ModerationBlock {
                    [JsonProperty(LanguageEn ? "PNG : Player information popup background (831x599)" : "PNG : Задний фон всплывающего окна с информацией о игроке (831x599)")]
                    public String ModeratorPoopUPBackgorund;
                    [JsonProperty(LanguageEn ? "PNG : Element background for text (155x22)" : "PNG : Задний фон элемента для текста (155x22)")]
                    public String ModeratorPoopUPTextBackgorund;
                    [JsonProperty(LanguageEn ? "PNG : Information panel background (196x240)" : "PNG : Задний фон панели с информацией (196x240)")]
                    public String ModeratorPoopUPPanelBackgorund;
                }
                internal class LeftBlock {
                    [JsonProperty(LanguageEn ? "PNG : Icon for sidebar button (192x55)" : "PNG : Иконка для кнопки в боковом меню (192x55)")]
                    public String ButtonBackgorund;
                    [JsonProperty(LanguageEn ? "PNG : Icon for the button in `reports` (32x32)" : "PNG : Иконка для кнопки в `жалобы`(32x32)")]
                    public String ReportIcon;
                    [JsonProperty(LanguageEn ? "PNG : Icon for the button in `moderation` (32x32)" : "PNG : Иконка для кнопки в `модерация`(32x32)")]
                    public String ModerationIcon;
                }
                internal class PlayerListBlock {
                    [JsonProperty(LanguageEn ? "PNG : Cause selection popup background (567x599)" : "PNG : Задний фон всплывающего сообщения с выбором причины (567x599)")]
                    public String PoopUpBackgorund;
                    [JsonProperty(LanguageEn ? "PNG : Reason background in popup (463x87)" : "PNG : Задний фон причины в всплывающем окне (463x87)")]
                    public String PoopUpReasonBackgorund;
                }
                internal class StatisticsBlock {
                    [JsonProperty(LanguageEn ? "PNG Background of the statistics block (283x81)" : "PNG Задний фон блока статистики (283x81)")]
                    public String BlockStatsModeration;
                    [JsonProperty(LanguageEn ? "PNG Background of the rating block in statistics (65x28)" : "PNG Задний фон блока рейтинга в статистике (65x28)")]
                    public String BlockStatsRaitingModeration;
                    [JsonProperty(LanguageEn ? "PNG : Rating icon in statistics (16x15)" : "PNG : Иконка рейтинга в статистике (16x15)")]
                    public String RaitingImage;
                }
            }
            internal class Colors {
                [JsonProperty(LanguageEn ? "RGBA of the main text color" : "RGBA основного цвета текста")]
                public String MainColorText;
                [JsonProperty(LanguageEn ? "RGBA of additional text color" : "RGBA дополнительного цвета текста")]
                public String AdditionalColorText;
                [JsonProperty(LanguageEn ? "RGBA additional color of elements (Buttons, dies)" : "RGBA дополнительный цвет элементов (Кнопки, плашки)")]
                public String AdditionalColorElements;
                [JsonProperty(LanguageEn ? "RGBA additional color of elements (Buttons, dies) #2" : "RGBA дополнительный цвет элементов (Кнопки, плашки) #2")]
                public String AdditionalColorElementsTwo;
                [JsonProperty(LanguageEn ? "RGBA additional color of elements (Buttons, dies) #3" : "RGBA дополнительный цвет элементов (Кнопки, плашки) #3")]
                public String AdditionalColorElementsThree;
                [JsonProperty(LanguageEn ? "RGBA the main color" : "RGBA основной цвет")]
                public String MainColor;
            }
            internal class References {
                [JsonProperty(LanguageEn ? "IQFakeActive : Use collaboration (true - yes/false - no)" : "IQFakeActive : Использовать совместную работу (true - да/false - нет)")]
                public Boolean IQFakeActiveUse;
                [JsonProperty(LanguageEn ? "Setting up IQChat" : "Настройка IQChat")]
                public IQChatReference IQChatSetting = new IQChatReference();
                [JsonProperty(LanguageEn ? "Setting up NoEscape" : "Настройка NoEscape")]
                public NoEscapeReference NoEscapeSetting = new NoEscapeReference();
                [JsonProperty(LanguageEn ? "Duels : Reschedule the player's check if he is in a duel (true - yes/false - no)" : "Duels : Перенести проверку игрока если он на дуэли (true - да/false - нет)")]
                public Boolean NoCheckedDuel;
                [JsonProperty(LanguageEn ? "Setting up Friends" : "Настройка Friends")]
                public FriendsReference FriendsSetting = new FriendsReference();
                [JsonProperty(LanguageEn ? "Setting up Clans" : "Настройка Clans")]
                public ClansReference ClansSetting = new ClansReference();
                [JsonProperty(LanguageEn ? "Setting up MultiFighting (Luma)" : "Настройка MultiFighting (Luma)")]
                public MultiFighting MultiFightingSetting = new MultiFighting();
                [JsonProperty(LanguageEn ? "Setting up StopDamageMan" : "Настройка StopDamageMan")]
                public StopDamageMan StopDamageManSetting = new StopDamageMan();
                [JsonProperty(LanguageEn ? "Setting up RCC support" : "Настройка поддержки RCC")]
                public RustCheatCheck RCCSettings = new RustCheatCheck();
                [JsonProperty(LanguageEn ? "Setting up OzProtect support" : "Настройка поддержки OzProtect")]
                public OzProtectCheck OzProtectSettings = new OzProtectCheck();
                internal class MultiFighting {
                    [JsonProperty(LanguageEn ? "MultiFighting (Luma) : Display an icon with the player status - `Steam` / `Pirate`" : "MultiFighting (Luma) : Отображать иконку со статусом игрока - `Steam` / `Пират`")]
                    public Boolean UseSteamCheck;
                }
                internal class StopDamageMan {
                    [JsonProperty(LanguageEn ? "StopDamageMan : Disable player damage during check" : "StopDamageMan : Отключать игроку урон во время проверки")]
                    public Boolean UseStopDamage;
                }
                internal class RustCheatCheck {
                    [JsonProperty(LanguageEn ? "RCC key (if you don't need RCC support, leave the key blank)" : "Ключ RCC (если вам не нужна поддержка RCC - оставьте ключ пустым)")]
                    public String RCCKey;
                }
                internal class OzProtectCheck {
                    [JsonProperty(LanguageEn ? "OzProtect key (if you don't need OzProtect support, leave the key blank)" : "Ключ OzProtect (если вам не нужна поддержка OzProtect - оставьте ключ пустым)")]
                    public String OzProtectKey;
                }
                internal class IQChatReference {
                    [JsonProperty(LanguageEn ? "IQChat : Custom prefix in chat" : "IQChat : Кастомный префикс в чате")]
                    public String CustomPrefix;
                    [JsonProperty(LanguageEn ? "IQChat : Custom chat avatar (If required)" : "IQChat : Кастомный аватар в чате(Если требуется)")]
                    public String CustomAvatar;
                    [JsonProperty(LanguageEn ? "IQChat : Use UI notification (true - yes/false - no)" : "IQChat : Использовать UI уведомление (true - да/false - нет)")]
                    public Boolean UIAlertUse;
                }
                internal class NoEscapeReference {
                    [JsonProperty(LanguageEn ? "NoEscape : Reschedule a player's check if he has a `Raid-Block` (true - yes/false - no)" : "NoEscape : Перенести проверку игрока если у него есть `Raid-Блок` (true - да/false - нет)")]
                    public Boolean NoCheckedRaidBlock;
                    [JsonProperty(LanguageEn ? "NoEscape : Reschedule a player's check if he has a `Combat-Block` (true - yes/false - no)" : "NoEscape : Перенести проверку игрока если у него есть `Комбат-Блок` (true - да/false - нет)")]
                    public Boolean NoCheckedCombatBlock;
                }
                internal class FriendsReference {
                    [JsonProperty(LanguageEn ? "Friends : Prohibit players in the team from sending reports to each other (true - yes/false - no)" : "Friends : Запретить игрокам в команде отправлять репорты друг на друга (true - да/false - нет)")]
                    public Boolean SendReportFriend;
                    [JsonProperty(LanguageEn ? "Friends : Prohibit the moderator from checking his teammate (true - yes/false - no)" : "Friends : Запретить модератору проверять своего тиммейта (true - да/false - нет)")]
                    public Boolean StartCheckedFriend;
                }
                internal class ClansReference {
                    [JsonProperty(LanguageEn ? "Clans : Prohibit players in the same clan from sending reports to each other (true - yes/false - no)" : "Clans : Запретить игрокам в одном клане отправлять репорты друг на друга (true - да/false - нет)")]
                    public Boolean SendReportClan;
                    [JsonProperty(LanguageEn ? "Clans : Prohibit the moderator from checking the members of his clan (true - yes/false - no)" : "Clans : Запретить модератору проверять участников своего клана (true - да/false - нет)")]
                    public Boolean StartCheckedClan;
                }
            }
            internal class LangText {
                [JsonProperty(LanguageEn ? "Reason title russian" : "Причина на русском")]
                public String LanguageRU;
                [JsonProperty(LanguageEn ? "Reason title english" : "Причина на английском")]
                public String LanguageEN;
                public String GetReasonTitle(UInt64 TargetID) => _.lang.GetLanguage(TargetID.ToString()).Equals("ru") ? LanguageRU : LanguageEN;
            }
            public static Configuration GetNewConfiguration() {
                return new Configuration {
                    CommandForContact = "discord", VerdictControllerSettings = new VerdictController() {
                        UseBanAllTeam = false, IndexBanReason = 5,
                    }
                    , CheckControllerSettings = new CheckController {
                        StopCheckLeavePlayer = false, UseDemo = true, UseSoundAlert = false, UseCheckAFK = true, TrackCrafting = false, TrackChat = false, TrackCommand = false,
                    }
                    , NotifyChatSettings = new NotifyChat() {
                        UseNotifyCheck = true, UseNotifyStopCheck = true, UseNotifyVerdictCheck = true,
                    }
                    , NotifyVKSettings = new NotifyVK() {
                        VKTokenGroup = "", VKChatID = ""
                    }
                    , NotifyDiscordSettings = new NotifyDiscord() {
                        WebhooksList = new NotifyDiscord.Webhooks() {
                            NotifySendReport = new NotifyDiscord.Webhooks.TemplatesNotify() {
                                WebhookNotify = "", Color = 16728083, AuthorName = LanguageEn ? "NEW REPORT" : "НОВАЯ ЖАЛОБА", IconURL = "https://i.imgur.com/2N5je4x.jpg",
                            }
                            , NotifyContacts = new NotifyDiscord.Webhooks.TemplatesNotify() {
                                WebhookNotify = "", Color = 13850622, AuthorName = LanguageEn ? "PROVIDED CONTACTS" : "ПРЕДОСТАВЛЕННЫЕ КОНТАКТЫ", IconURL = "https://i.imgur.com/bGJtYB5.jpg",
                            }
                            , NotifyStartCheck = new NotifyDiscord.Webhooks.TemplatesNotify {
                                WebhookNotify = "", Color = 16755200, AuthorName = LanguageEn ? "PLAYER CHECK" : "ПРОВЕРКА ИГРОКА", IconURL = "https://i.imgur.com/2N5je4x.jpg",
                            }
                            , NotifyStopCheck = new NotifyDiscord.Webhooks.TemplatesNotify() {
                                WebhookNotify = "", Color = 7846721, AuthorName = LanguageEn ? "COMPLETE CHECK" : "ЗАВЕРШЕННАЯ ПРОВЕРКА", IconURL = "https://i.imgur.com/VKwsjXO.jpg",
                            }
                            , NotifyMaxReport = new NotifyDiscord.Webhooks.TemplatesNotify() {
                                WebhookNotify = "", Color = 16728083, AuthorName = LanguageEn ? "MAXIMUM NUMBER OF COMPLAINTS" : "МАКСИМАЛЬНОЕ КОЛИЧЕСТВО ЖАЛОБ", IconURL = "https://i.imgur.com/2N5je4x.jpg",
                            }
                            , NotifyStatusPlayerOrModerator = new NotifyDiscord.Webhooks.TemplatesNotify() {
                                WebhookNotify = "", Color = 16752000, AuthorName = LanguageEn ? "CONNECTION STATUS CHANGES" : "ИЗМЕНЕНИЯ СТАТУСА ПОДКЛЮЧЕНИЯ", IconURL = "https://i.imgur.com/2N5je4x.jpg",
                            }
                        }
                    }
                    , ReasonList = new List<ReasonReport>() {
                        new ReasonReport {
                            Title = new LangText() {
                                LanguageRU = "Подозрительный", LanguageEN = "Suspicious"
                            }
                            , BanCommand = "ban {0} 1d {1}", HideUser = false,
                        }
                        , new ReasonReport {
                            Title = new LangText() {
                                LanguageRU = "Макросы", LanguageEN = "Macros"
                            }
                            , BanCommand = "ban {0} 14d {1}", HideUser = false,
                        }
                        , new ReasonReport {
                            Title = new LangText() {
                                LanguageRU = "Читер", LanguageEN = "Cheater"
                            }
                            , BanCommand = "ban {0} {1}", HideUser = false,
                        }
                        , new ReasonReport {
                            Title = new LangText() {
                                LanguageRU = "3+", LanguageEN = "3+"
                            }
                            , BanCommand = "ban {0} 7d {1}", HideUser = false,
                        }
                        , new ReasonReport {
                            Title = new LangText() {
                                LanguageRU = "Отказ от проверки", LanguageEN = "Refusal to check"
                            }
                            , BanCommand = "ban {0} 7d {1}", HideUser = true,
                        }
                        , new ReasonReport {
                            Title = new LangText() {
                                LanguageRU = "Игра с нарушителем", LanguageEN = "Playing with the intruder"
                            }
                            , BanCommand = "ban {0} 3d {1}", HideUser = false,
                        }
                        ,
                    }
                    , ReportF7AndGameMenuSettings = new ReportF7AndGameMenu() {
                        UseFunction = true, DefaultIndexReason = 2,
                    }
                    , ReportSendControllerSettings = new ReportSendController() {
                        CooldownRepeatOrAll = false, CooldownReport = 300, NoRepeatReport = true,
                    }
                    , ReportContollerModerationSettings = new ReportContollerModeration() {
                        ReportCountTrigger = 1, AlertModerationSettings = new ReportContollerModeration.AlertModeration {
                            AlertModerator = true, AlertSound = true, PathSound = "assets/prefabs/npc/autoturret/effects/targetacquired.prefab"
                        }
                    }
                    , ColorsSettings = new Colors() {
                        MainColorText = "1 1 1 1", AdditionalColorText = "1 1 1 0.7", AdditionalColorElements = "0.20 0.22 0.25 1", MainColor = "0.12 0.14 0.16 1", AdditionalColorElementsTwo = "0.28 0.27 0.45 1", AdditionalColorElementsThree = "0.30 0.77 0.99 1",
                    }
                    , ImagesSettings = new Images {
                        Background = "https://i.postimg.cc/fbBsG7hv/0N6OgXu.png", PageDown = "https://i.postimg.cc/P5qnmpDp/fYZKtuF.png", PageUp = "https://i.postimg.cc/Vkv2SyyX/P17Rrjp.png", Search = "https://i.postimg.cc/GhGxqqk6/yVBF1X7.png", AvatarBlur = "https://i.postimg.cc/Jh2X1kNb/111.png", ReasonModeratorAndRaiting = "https://i.postimg.cc/PrQ8Ccbf/Reason-Moderator.png", PlayerAlerts = "https://i.postimg.cc/TYfJNnCw/XMeNBAj.png", PlayerMenuRaitingSettings = new Images.PlayerMenuRaiting() {
                            PlayerMenuRaitingBackground = "https://i.postimg.cc/xTfL3n1N/lLOWzFo.png",
                        }
                        , ModeratorMenuCheckedSettings = new Images.ModeratorMenuChecked() {
                            ModeratorCheckedBackground = "https://i.postimg.cc/P58JmRY8/nBXA5xm.png", ModeratorCheckedStopButton = "https://i.postimg.cc/76PqQsG9/osbdHca.png", ModeratorVerdictButton = "https://i.postimg.cc/85CVb79n/1vthtRD.png", SteamIcoPlayer = "https://i.postimg.cc/fymZV66w/htRHWNV.png", PirateIcoPlayer = "https://i.postimg.cc/XvP0QjWj/GLZQK5a.png",
                        }
                        , ModerationBlockSettings = new Images.ModerationBlock() {
                            ModeratorPoopUPBackgorund = "https://i.postimg.cc/CK9xdHzs/aqjRQqw.png", ModeratorPoopUPTextBackgorund = "https://i.postimg.cc/Ss7bKv23/ZYEcVG2.png", ModeratorPoopUPPanelBackgorund = "https://i.postimg.cc/3NcSrXBz/1eSlL3s.png",
                        }
                        , LeftBlockSettings = new Images.LeftBlock {
                            ButtonBackgorund = "https://i.postimg.cc/QMhb3YDH/wgYl90C.png", ReportIcon = "https://i.postimg.cc/bJ2H07HV/mayvxja.png", ModerationIcon = "https://i.postimg.cc/ZnxNV49H/UXhlKHq.png",
                        }
                        , PlayerListBlockSettings = new Images.PlayerListBlock() {
                            PoopUpBackgorund = "https://i.postimg.cc/bJQSwpRP/6TGBXIv.png", PoopUpReasonBackgorund = "https://i.postimg.cc/ncV9n898/eq76Zc0.png",
                        }
                        , StatisticsBlockSettings = new Images.StatisticsBlock {
                            BlockStatsModeration = "https://i.postimg.cc/brwYfhC3/iPobuoo.png", BlockStatsRaitingModeration = "https://i.postimg.cc/dVysYn6P/B17soOi.png", RaitingImage = "https://i.postimg.cc/Wpdb82Z1/2Vo6MQ8.png",
                        }
                    }
                    , ReferenceSettings = new References {
                        IQFakeActiveUse = false, StopDamageManSetting = new References.StopDamageMan() {
                            UseStopDamage = false,
                        }
                        , MultiFightingSetting = new References.MultiFighting() {
                            UseSteamCheck = false,
                        }
                        , IQChatSetting = new References.IQChatReference {
                            CustomPrefix = "[<color=#FF4B42>IQReportSystem</color>]\n", CustomAvatar = "0", UIAlertUse = false,
                        }
                        , NoEscapeSetting = new References.NoEscapeReference() {
                            NoCheckedRaidBlock = true, NoCheckedCombatBlock = false,
                        }
                        , NoCheckedDuel = true, FriendsSetting = new References.FriendsReference() {
                            SendReportFriend = true, StartCheckedFriend = true,
                        }
                        , ClansSetting = new References.ClansReference() {
                            SendReportClan = true, StartCheckedClan = true,
                        }
                        , RCCSettings = new References.RustCheatCheck() {
                            RCCKey = "",
                        }
                        , OzProtectSettings = new References.OzProtectCheck() {
                            OzProtectKey = "",
                        }
                    }
                }
                ;
            }
        }
        private void DrawUI_Moderator_Checked_Menu_Status(BasePlayer moderator, String Status) {
            String Interface = InterfaceBuilder.GetInterface($"{InterfaceBuilder.UI_LAYER}_ONLINE_STATUS_CHECKED_MODERATOR");
            if (Interface == null) return;
            Interface = Interface.Replace("%TITLE_PROFILE_MODERATOR_CHECKED_MENU_TITLE_STATUS%", GetLang("TITLE_PROFILE_MODERATOR_CHECKED_MENU_TITLE_STATUS", moderator.UserIDString, Status));
            CuiHelper.DestroyUi(moderator, "InfoStatus");
            CuiHelper.AddUi(moderator, Interface);
        }
        private void SoundPlay(BasePlayer player) {
            SpeakerEntityMgr.SpeakerEntity speaker = SpeakerEntityMgr.Create(player);
            speaker.SendEntitities();
            String SoundName = lang.GetLanguage(player.UserIDString).Equals("ru") ? "ALERT_REPORT_RU" : "ALERT_REPORT_EN";
            Coroutine routine = ServerMgr.Instance.StartCoroutine(SendSounds(player, SoundName, speaker));
            if (!RoutineSounds.ContainsKey(player)) RoutineSounds.Add(player, routine);
            else {
                if (RoutineSounds[player] != null) ServerMgr.Instance.StopCoroutine(RoutineSounds[player]);
                RoutineSounds[player] = routine;
            }
            timer.Once(15f, () => {
                speaker.Kill();
                if (RoutineSounds[player] != null) ServerMgr.Instance.StopCoroutine(RoutineSounds[player]);
            }
            );
        }
        private void SendReportPlayer(BasePlayer Sender, UInt64 TargetID, Int32 ReasonIndex, Boolean IsFakeUser = false) {
            CuiHelper.DestroyUi(Sender, "BLURED_POOP_UP");
            CuiHelper.DestroyUi(Sender, InterfaceBuilder.UI_REPORT_POOPUP_PLAYER);
            if (PlayerRepositories.ContainsKey(Sender.userID)) {
                if (PlayerRepositories[Sender.userID].IsRepeatReported(TargetID)) {
                    SendChat(GetLang("FUNCIONAL_NO_DUPLE_SEND_REPORT", Sender.UserIDString), Sender);
                    return;
                }
                if (PlayerRepositories[Sender.userID].IsCooldown(TargetID)) {
                    SendChat(GetLang("FUNCIONAL_COOLDOWN_REPORT", Sender.UserIDString, PlayerRepositories[Sender.userID].GetCooldownLeft(TargetID)), Sender);
                    return;
                }
            }
            PlayerInformations[Sender.userID].SendReports++;
            if (IsFakeUser) {
                SendChat(GetLang("FUNCIONAL_SEND_REPORT_SUCCESS", Sender.UserIDString, GetFakeName(TargetID.ToString())), Sender);
                AddCooldown(Sender.userID, TargetID);
                return;
            }
            PlayerInformations[TargetID].Reports++;
            Configuration.ReasonReport Reason = config.ReasonList.Where(reasonReport => !reasonReport.HideUser).ToList()[ReasonIndex];
            PlayerInformations[TargetID].ReasonHistory.Add(Reason.Title);
            GetPlayerCheckServerRCC(TargetID);
            GetPlayerCheckServerOzProtect(TargetID);
            BasePlayer Target = BasePlayer.FindByID(TargetID);
            if (Target != null) SendChat(GetLang("FUNCIONAL_SEND_REPORT_SUCCESS", Sender.UserIDString, Target.displayName), Sender);
            Configuration.NotifyDiscord.Webhooks.TemplatesNotify TemplateDiscord = config.NotifyDiscordSettings.WebhooksList.NotifySendReport;
            if (!String.IsNullOrWhiteSpace(TemplateDiscord.WebhookNotify)) {
                List<Fields> fields = DT_PlayerSendReport(Sender, TargetID, LanguageEn ? Reason.Title.LanguageEN : Reason.Title.LanguageRU);
                SendDiscord(TemplateDiscord.WebhookNotify, fields, GetAuthorDiscord(TemplateDiscord), TemplateDiscord.Color);
            }
            SendVK(VKT_PlayerSendReport(Sender, TargetID, LanguageEn ? Reason.Title.LanguageEN : Reason.Title.LanguageRU));
            AddCooldown(Sender.userID, TargetID);
            if (PlayerInformations[TargetID].Reports >= config.ReportContollerModerationSettings.ReportCountTrigger && Target != null) {
                foreach (BasePlayer mList in BasePlayer.activePlayerList.Where(m => permission.UserHasPermission(m.UserIDString, ModeratorPermissions))) AlertModerator(mList, Target.displayName, PlayerInformations[TargetID].Reports);
                AlertMaxReportDiscord(Target.displayName, PlayerInformations[TargetID].Reports, TargetID);
            }
            Interface.Call("OnSendedReport", Sender, TargetID, LanguageEn ? Reason.Title.LanguageEN : Reason.Title.LanguageRU);
        }
        public class NpcSound {
            [JsonConverter(typeof(SoundFileConverter))]
            public List<byte[]> Data = new List<byte[]>();
        }
        private IEnumerator SendSounds(BasePlayer player, String clipName, SpeakerEntityMgr.SpeakerEntity speakerEntity) {
            NpcSound sound = LoadDataSound(clipName);
            if (sound == null) {
                if (RoutineSounds[player] != null) ServerMgr.Instance.StopCoroutine(RoutineSounds[player]);
                speakerEntity?.Kill();
                yield break;
            }
            yield return CoroutineEx.waitForSeconds(0.1f);
            foreach (byte[] data in sound.Data) {
                if (speakerEntity == null) {
                    break;
                }
                SendSound(speakerEntity.UID_SPEAKER, data);
                yield return CoroutineEx.waitForSeconds(0.07f);
            }
            if (RoutineSounds[player] != null) ServerMgr.Instance.StopCoroutine(RoutineSounds[player]);
            yield break;
        }
        public Dictionary<BasePlayer, Coroutine> RoutineSounds = new Dictionary<BasePlayer, Coroutine>();
        private Boolean IsClansSendReport(String userID, String targetID) => config.ReferenceSettings.ClansSetting.SendReportClan && IsClans(userID, targetID);
        private IEnumerator StartAfkCheck(BasePlayer Target, BasePlayer Moderator, Boolean IsConsole = false, Boolean SkipAFK = false) {
            UInt64 TargetID = Target.userID;
            if (!IsValidStartChecked(Target, Moderator, IsConsole)) yield break;
            if (!PlayerChecks.ContainsKey(TargetID)) {
                PlayerChecks.Add(Target.userID, new ProcessCheckRepository {
                    DiscordTarget = String.Empty, DisplayName = Target.displayName, ModeratorID = !IsConsole ? Moderator.userID : 0
                }
                );
            }
            else {
                PlayerChecks[TargetID].DisplayName = Target.displayName;
                PlayerChecks[TargetID].ModeratorID = !IsConsole ? Moderator.userID : 0;
                PlayerChecks[TargetID].DiscordTarget = String.Empty;
            }
            if (!SkipAFK) {
                if (!IsConsole && Moderator != null) SendChat(GetLang("FUNCIONAL_MESSAGE_CHECK_AFK_STARTING", Moderator.UserIDString), Moderator);
                else Puts(LanguageEn ? "We start checking the player on AFK" : "Начинаем проверку игрока на AFK");
                Int32 NoAFK_Amount = 0;
                for (Int32 TryCheck = 1; TryCheck < 6; TryCheck++) {
                    if (Target == null) {
                        if (!IsConsole && Moderator != null) SendChat(GetLang("FUNCIONAL_MESSAGE_CHECK_AFK_PLAYER_LEAVE", Moderator.UserIDString), Moderator);
                        else Puts(LanguageEn ? "The player left the server at the stage of checking for AFK.Check canceled, try again later" : "Игрок покинул сервер на стадии проверки на AFK.Проверка отменена, повторите попытку позже");
                        StopCheckedPlayer(TargetID, Moderator, true);
                        yield break;
                    }
                    if (!IsConsole) if (Moderator == null) {
                        PrintWarning(LanguageEn ? $"The moderator who called the player {Target.displayName}({Target.UserIDString}) - left the server, interrupting the check AFK!" : $"Модератор вызвавший игрока {Target.displayName}({Target.UserIDString}) - покинул сервер, прервав проверку на AFK!");
                        StopCheckedPlayer(TargetID, Moderator, true);
                        yield break;
                    }
                    if (Target.IdleTime < 10) NoAFK_Amount++;
                    if (!IsConsole && Moderator != null) SendChat(
// ... [Code preview truncated due to length. Full source in attached file] ...

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху