C#:
using ConVar;
using System.Linq;
using UnityEngine.Networking;
using Newtonsoft.Json.Linq;
using Oxide.Core;
using Oxide.Core.Libraries.Covalence;
using System.Collections;
using Oxide.Core.Libraries;
using UnityEngine;
using System.IO;
using CompanionServer;
using System;
using Oxide.Core.Plugins;
using System.Text.RegularExpressions;
using System.Text;
using Oxide.Game.Rust.Cui;
using Facepunch;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Oxide.Plugins {
[Info("IQChat", "Mercury", "2.14.56")]
[Description("The most pleasant chat for your server from the IQ system")]
class IQChat : RustPlugin {
private String GetPlayerFormat(BasePlayer playerInList) {
GeneralInformation.RenameInfo Renamer = GeneralInfo.GetInfoRename(playerInList.userID);
String NickNamed = Renamer != null ? $"{Renamer.RenameNick ?? playerInList.displayName}" : playerInList.displayName;
User Info = UserInformation[playerInList.userID];
Configuration.ControllerParameters ControllerParameter = config.ControllerParameter;
Configuration.ControllerMute ControllerMutes = config.ControllerMutes;
String Prefixes = String.Empty;
String ColorNickPlayer = String.IsNullOrWhiteSpace(Info.Info.ColorNick) ? playerInList.IsAdmin ? "#a8fc55" : "#54aafe" : Info.Info.ColorNick;
if (ControllerParameter.Prefixes.TurnMultiPrefixes) {
if (Info.Info.PrefixList != null) Prefixes = String.Join("", Info.Info.PrefixList.Take(ControllerParameter.Prefixes.MaximumMultiPrefixCount));
}
else Prefixes = Info.Info.Prefix;
String ResultName = $"{Prefixes}<color={ColorNickPlayer}>{NickNamed}</color>";
return ResultName;
}
private void DrawUI_IQChat_Alert(BasePlayer player, String Description, String Title = null) {
if (_interface == null) {
PrintWarning("Генерируем интерфейс, ожидайте сообщения об успешной генерации");
return;
}
String Interface = InterfaceBuilder.GetInterface("UI_Chat_Alert");
if (Interface == null) return;
Interface = Interface.Replace("%TITLE%", Title ?? GetLang("IQCHAT_ALERT_TITLE", player.UserIDString));
Interface = Interface.Replace("%DESCRIPTION%", Description);
CuiHelper.DestroyUi(player, InterfaceBuilder.UI_Chat_Alert);
CuiHelper.AddUi(player, Interface);
player.Invoke(() => {
CuiHelper.DestroyUi(player, InterfaceBuilder.UI_Chat_Alert);
}
, config.ControllerMessages.GeneralSetting.OtherSetting.TimeDeleteAlertUI);
}
protected override void LoadDefaultConfig() => config = Configuration.GetNewConfiguration();
public static StringBuilder sb = new StringBuilder();
private void DrawUI_IQChat_Update_MuteChat_All(BasePlayer player) {
if (!permission.UserHasPermission(player.UserIDString, PermissionMutedAdmin)) return;
String InterfaceAdministratorChat = InterfaceBuilder.GetInterface("UI_Chat_Administation_AllChat");
if (InterfaceAdministratorChat == null) return;
InterfaceAdministratorChat = InterfaceAdministratorChat.Replace("%TEXT_MUTE_ALLCHAT%", GetLang(!GeneralInfo.TurnMuteAllChat ? "IQCHAT_BUTTON_MODERATION_MUTE_ALL_CHAT" : "IQCHAT_BUTTON_MODERATION_UNMUTE_ALL_CHAT", player.UserIDString));
InterfaceAdministratorChat = InterfaceAdministratorChat.Replace("%COMMAND_MUTE_ALLCHAT%", $"newui.cmd action.mute.ignore mute.controller {SelectedAction.Mute} mute.all.chat");
CuiHelper.DestroyUi(player, "ModeratorMuteAllChat");
CuiHelper.AddUi(player, InterfaceAdministratorChat);
}
private void SeparatorChat(Chat.ChatChannel channel, BasePlayer player, String Message) {
Configuration.ControllerMessage.TurnedFuncional.AntiNoob.Settings antiNoob = config.ControllerMessages.TurnedFunc.AntiNoobSetting.AntiNoobChat;
if (antiNoob.AntiNoobActivate) if (IsNoob(player.userID, antiNoob.TimeBlocked)) {
ReplySystem(player, GetLang("IQCHAT_INFO_ANTI_NOOB", player.UserIDString, FormatTime(UserInformationConnection[player.userID].LeftTime(antiNoob.TimeBlocked), player.UserIDString)));
return;
}
Configuration.ControllerMessage ControllerMessage = config.ControllerMessages;
if (ControllerMessage.TurnedFunc.AntiSpamSetting.AntiSpamActivate) if (!permission.UserHasPermission(player.UserIDString, PermissionAntiSpam)) {
if (!Flooders.ContainsKey(player.userID)) Flooders.Add(player.userID, new FlooderInfo {
Time = CurrentTime + ControllerMessage.TurnedFunc.AntiSpamSetting.FloodTime, LastMessage = Message
}
);
else {
if (Flooders[player.userID].Time > CurrentTime) {
ReplySystem(player, GetLang("FLOODERS_MESSAGE", player.UserIDString, Convert.ToInt32(Flooders[player.userID].Time - CurrentTime)));
return;
}
if (ControllerMessage.TurnedFunc.AntiSpamSetting.AntiSpamDuplesSetting.AntiSpamDuplesActivate) {
if (Flooders[player.userID].LastMessage == Message) {
if (Flooders[player.userID].TryFlood >= ControllerMessage.TurnedFunc.AntiSpamSetting.AntiSpamDuplesSetting.TryDuples) {
MutePlayer(player, MuteType.Chat, 0, null, ControllerMessage.TurnedFunc.AntiSpamSetting.AntiSpamDuplesSetting.MuteSetting.Reason, ControllerMessage.TurnedFunc.AntiSpamSetting.AntiSpamDuplesSetting.MuteSetting.SecondMute);
Flooders[player.userID].TryFlood = 0;
return;
}
Flooders[player.userID].TryFlood++;
}
}
}
Flooders[player.userID].Time = ControllerMessage.TurnedFunc.AntiSpamSetting.FloodTime + CurrentTime;
Flooders[player.userID].LastMessage = Message;
}
GeneralInformation General = GeneralInfo;
GeneralInformation.RenameInfo RenameInformation = General.GetInfoRename(player.userID);
User Info = UserInformation[player.userID];
Configuration.ControllerParameters ControllerParameter = config.ControllerParameter;
Configuration.ControllerMute ControllerMutes = config.ControllerMutes;
Configuration.ControllerMessage.GeneralSettings.OtherSettings OtherController = config.ControllerMessages.GeneralSetting.OtherSetting;
if (General.TurnMuteAllChat) {
ReplySystem(player, GetLang("IQCHAT_FUNCED_NO_SEND_CHAT_MUTED_ALL_CHAT", player.UserIDString));
return;
}
if (channel == Chat.ChatChannel.Team && !ControllerMessage.TurnedFunc.MuteTeamChat) {
}
else if (Info.MuteInfo.IsMute(MuteType.Chat)) {
ReplySystem(player, GetLang("IQCHAT_FUNCED_NO_SEND_CHAT_MUTED", player.UserIDString, FormatTime(Info.MuteInfo.GetTime(MuteType.Chat), player.UserIDString)));
return;
}
String SendFormat = String.Empty;
String Prefixes = String.Empty;
String FormattingMessage = Message;
String DisplayName = player.displayName;
UInt64 UserID = player.userID;
if (RenameInformation != null) {
DisplayName = RenameInformation.RenameNick;
UserID = RenameInformation.RenameID;
}
String ColorNickPlayer = String.IsNullOrWhiteSpace(Info.Info.ColorNick) ? player.IsAdmin ? "#a8fc55" : "#54aafe" : Info.Info.ColorNick;
DisplayName = $"<color={ColorNickPlayer}>{DisplayName}</color>";
String ChannelMessage = channel == Chat.ChatChannel.Team ? "<color=#a5e664>[Team]</color>" : channel == Chat.ChatChannel.Cards ? "<color=#AA8234>[Cards]</color>" : "";
if (ControllerMessage.Formatting.UseBadWords) {
Tuple<String, Boolean> GetTuple = BadWordsCleaner(Message, ControllerMessage.Formatting.ReplaceBadWord, ControllerMessage.Formatting.BadWords);
FormattingMessage = GetTuple.Item1;
if (GetTuple.Item2 && channel == Chat.ChatChannel.Global) {
if (permission.UserHasPermission(player.UserIDString, PermissionMute)) IQPersonalSendBadWords(player);
if (ControllerMutes.AutoMuteSettings.UseAutoMute) MutePlayer(player, MuteType.Chat, 0, null, ControllerMutes.AutoMuteSettings.AutoMuted.Reason, ControllerMutes.AutoMuteSettings.AutoMuted.SecondMute);
}
}
if (ControllerMessage.Formatting.FormatMessage) FormattingMessage = $"{FormattingMessage.Substring(0, 1).ToUpper()}{FormattingMessage.Remove(0, 1).ToLower()}";
if (ControllerParameter.Prefixes.TurnMultiPrefixes) {
if (Info.Info.PrefixList != null) Prefixes = String.Join("", Info.Info.PrefixList.Take(ControllerParameter.Prefixes.MaximumMultiPrefixCount));
}
else Prefixes = Info.Info.Prefix;
String ResultMessage = String.IsNullOrWhiteSpace(Info.Info.ColorMessage) ? FormattingMessage : $"<color={Info.Info.ColorMessage}>{FormattingMessage}</color>";
String ResultReference = GetReferenceTags(player);
SendFormat = $"{ChannelMessage} {ResultReference}<size={OtherController.SizePrefix}>{Prefixes}</size> <size={OtherController.SizeNick}>{DisplayName}</size>: <size={OtherController.SizeMessage}>{ResultMessage}</size>";
if (config.RustPlusSettings.UseRustPlus) if (channel == Chat.ChatChannel.Team) {
RelationshipManager.PlayerTeam Team = RelationshipManager.ServerInstance.FindTeam(player.currentTeam);
if (Team == null) return;
Util.BroadcastTeamChat(player.Team, player.userID, player.displayName, FormattingMessage, Info.Info.ColorMessage);
}
if (ControllerMutes.LoggedMute.UseHistoryMessage && config.OtherSetting.LogsMuted.UseLogged) AddHistoryMessage(player, FormattingMessage);
ReplyChat(channel, player, SendFormat);
AnwserMessage(player, ResultMessage.ToLower());
Puts($"{player.displayName}({player.UserIDString}): {FormattingMessage}");
Log(LanguageEn ? $"CHAT MESSAGE : {player}: {ChannelMessage} {FormattingMessage}" : $"СООБЩЕНИЕ В ЧАТ : {player}: {ChannelMessage} {FormattingMessage}");
DiscordLoggChat(player, channel, Message);
RCon.Broadcast(RCon.LogType.Chat, new Chat.ChatEntry {
Message = $"{player.displayName} : {FormattingMessage}", UserId = player.UserIDString, Username = player.displayName, Channel = channel, Time = (DateTime.UtcNow.Hour * 3600) + (DateTime.UtcNow.Minute * 60),
}
);
}
public class Footer {
public string text {
get;
set;
}
public string icon_url {
get;
set;
}
public string proxy_icon_url {
get;
set;
}
public Footer(string text, string icon_url, string proxy_icon_url) {
this.text = text;
this.icon_url = icon_url;
this.proxy_icon_url = proxy_icon_url;
}
}
[ConsoleCommand("rename")]
private void ConsoleCommandRename(ConsoleSystem.Arg args) {
BasePlayer Renamer = args.Player();
if (Renamer == null) {
PrintWarning(LanguageEn ? "You can only use this command while on the server" : "Вы можете использовать эту команду только находясь на сервере");
return;
}
if (!permission.UserHasPermission(Renamer.UserIDString, PermissionRename)) return;
GeneralInformation General = GeneralInfo;
if (General == null) return;
if (args.Args.Length == 0 || args == null) {
ReplySystem(Renamer, lang.GetMessage("COMMAND_RENAME_NOTARG", this, Renamer.UserIDString));
return;
}
String Name = args.Args[0];
UInt64 ID = Renamer.userID;
if (args.Args.Length == 2 && args.Args[1] != null && !String.IsNullOrWhiteSpace(args.Args[1])) if (!UInt64.TryParse(args.Args[1], out ID)) {
ReplySystem(Renamer, lang.GetMessage("COMMAND_RENAME_NOT_ID", this, Renamer.UserIDString));
return;
}
if (General.RenameList.ContainsKey(Renamer.userID)) {
General.RenameList[Renamer.userID].RenameNick = Name;
General.RenameList[Renamer.userID].RenameID = ID;
}
else General.RenameList.Add(Renamer.userID, new GeneralInformation.RenameInfo {
RenameNick = Name, RenameID = ID
}
);
ReplySystem(Renamer, GetLang("COMMAND_RENAME_SUCCES", Renamer.UserIDString, Name, ID));
Renamer.displayName = Name;
}
void IQRankSetRank(ulong userID, string RankKey) => IQRankSystem?.Call("API_SET_ACTIVE_RANK", userID, RankKey);
[ConsoleCommand("set")]
private void CommandSet(ConsoleSystem.Arg args) {
BasePlayer Sender = args.Player();
if (Sender != null) if(!Sender.IsAdmin) return;
if (args == null || args.Args == null || args.Args.Length != 3) {
if (Sender != null) ReplySystem(Sender, LanguageEn ? "Use syntax correctly : set [Steam64ID] [prefix/chat/nick/custom] [Argument]" : "Используйте правильно ситаксис : set [Steam64ID] [prefix/chat/nick/custom] [Argument]");
else PrintWarning(LanguageEn ? "Use syntax correctly : set [Steam64ID] [prefix/chat/nick/custom] [Argument]" : "Используйте правильно ситаксис : set [Steam64ID] [prefix/chat/nick/custom] [Argument]");
return;
}
UInt64 Steam64ID = 0;
BasePlayer player = null;
if (UInt64.TryParse(args.Args[0], out Steam64ID)) player = BasePlayer.FindByID(Steam64ID);
if (player == null) {
if (Sender != null) ReplySystem(Sender, LanguageEn ? "Incorrect player Steam ID or syntax error\nUse syntax correctly : set [Steam64ID] [prefix/chat/nick/custom] [Argument]" : "Неверно указан SteamID игрока или ошибка в синтаксисе\nИспользуйте правильно ситаксис : set [Steam64ID] [prefix/chat/nick/custom] [Argument]");
else PrintWarning(LanguageEn ? "Incorrect player Steam ID or syntax error\nUse syntax correctly : set [Steam64ID] [prefix/chat/nick/custom] [Argument]" : "Неверно указан SteamID игрока или ошибка в синтаксисе\nИспользуйте правильно ситаксис : set [Steam64ID] [prefix/chat/nick/custom] [Argument]");
return;
}
if(!UserInformation.ContainsKey(player.userID)) {
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Player not found!" : $"Игрок не найден!");
else PrintWarning(LanguageEn ? $"Player not found!" : $"Игрок не найден!");
return;
}
User Info = UserInformation[player.userID];
Configuration.ControllerParameters ControllerParameter = config.ControllerParameter;
switch (args.Args[1]) {
case "prefix" : {
String KeyPrefix = args.Args[2];
if(ControllerParameter.Prefixes.Prefixes.Count(prefix => prefix.Argument.Contains(KeyPrefix)) == 0) {
if (Sender != null) ReplySystem(Sender, LanguageEn ? "Argument not found in your configuration" : $"Аргумент не найден в вашей конфигурации!");
else PrintWarning(LanguageEn ? $"Argument not found in your configuration" : $"Аргумент не найден в вашей конфигурации");
return;
}
foreach (Configuration.ControllerParameters.AdvancedFuncion Prefix in ControllerParameter.Prefixes.Prefixes.Where(prefix => prefix.Argument.Contains(KeyPrefix)).Take(1)) {
if (ControllerParameter.Prefixes.TurnMultiPrefixes) Info.Info.PrefixList.Add(Prefix.Argument);
else Info.Info.Prefix = Prefix.Argument;
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Prefix successfully set to - {Prefix.Argument}" : $"Префикс успешно установлен на - {Prefix.Argument}");
else Puts(LanguageEn ? $"Prefix successfully set to - {Prefix.Argument}" : $"Префикс успешно установлен на - {Prefix.Argument}");
}
break;
}
case "chat" : {
String KeyChatColor = args.Args[2];
if (ControllerParameter.MessageColorList.Count(color => color.Argument.Contains(KeyChatColor)) == 0) {
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Argument not found in your configuration!" : $"Аргумент не найден в вашей конфигурации!");
else PrintWarning(LanguageEn ? $"Argument not found in your configuration" : $"Аргумент не найден в вашей конфигурации");
return;
}
foreach (Configuration.ControllerParameters.AdvancedFuncion ChatColor in ControllerParameter.MessageColorList.Where(color => color.Argument.Contains(KeyChatColor)).Take(1)) {
Info.Info.ColorMessage = ChatColor.Argument;
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Message color successfully set to - {ChatColor.Argument}" : $"Цвет сообщения успешно установлен на - {ChatColor.Argument}");
else Puts(LanguageEn ? $"Message color successfully set to - {ChatColor.Argument}" : $"Цвет сообщения успешно установлен на - {ChatColor.Argument}");
}
break;
}
case "nick" : {
String KeyNickColor = args.Args[2];
if (ControllerParameter.NickColorList.Count(color => color.Argument.Contains(KeyNickColor)) == 0) {
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Argument not found in your configuration!" : $"Аргумент не найден в вашей конфигурации!");
else PrintWarning(LanguageEn ? "Argument not found in your configuration" : $"Аргумент не найден в вашей конфигурации");
return;
}
foreach (Configuration.ControllerParameters.AdvancedFuncion NickColor in ControllerParameter.NickColorList.Where(color => color.Argument.Contains(KeyNickColor)).Take(1)) {
Info.Info.ColorNick = NickColor.Argument;
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Message color successfully set to - {NickColor.Argument}" : $"Цвет сообщения успешно установлен на - {NickColor.Argument}");
else Puts(LanguageEn ? $"Message color successfully set to - {NickColor.Argument}" : $"Цвет сообщения успешно установлен на - {NickColor.Argument}");
}
break;
}
case "custom" : {
String CustomPrefix = args.Args[2];
if (ControllerParameter.Prefixes.TurnMultiPrefixes) Info.Info.PrefixList.Add(CustomPrefix);
else Info.Info.Prefix = CustomPrefix;
if (Sender != null) ReplySystem(Sender, LanguageEn ? $"Custom prefix successfully set to - {CustomPrefix}" : $"Кастомный префикс успешно установлен на - {CustomPrefix}");
else Puts(LanguageEn ? $"Custom prefix successfully set to - {CustomPrefix}" : $"Кастомный префикс успешно установлен на - {CustomPrefix}");
break;
}
default : {
if (Sender != null) ReplySystem(Sender, LanguageEn ? "Use syntax correctly : set [Steam64ID] [prefix/chat/nick/custom] [Argument]" : "Используйте правильно ситаксис : set [Steam64ID] [prefix/chat/nick/custom] [Argument]");
break;
}
}
}
private class ConfigurationOld {
[JsonProperty(LanguageEn ? "Setting up player information" : "Настройка информации о игроке")]
public ControllerConnection ControllerConnect = new ControllerConnection();
internal class ControllerConnection {
[JsonProperty(LanguageEn ? "Function switches" : "Перключатели функций")]
public Turned Turneds = new Turned();
[JsonProperty(LanguageEn ? "Setting Standard Values" : "Настройка стандартных значений")]
public SetupDefault SetupDefaults = new SetupDefault();
internal class SetupDefault {
[JsonProperty(LanguageEn ? "This prefix will be set if the player entered the server for the first time or in case of expiration of the rights to the prefix that he had earlier" : "Данный префикс установится если игрок впервые зашел на сервер или в случае окончания прав на префикс, который у него стоял ранее")]
public String PrefixDefault = "<color=#CC99FF>[ИГРОК]</color>";
[JsonProperty(LanguageEn ? "This nickname color will be set if the player entered the server for the first time or in case of expiration of the rights to the nickname color that he had earlier" : "Данный цвет ника установится если игрок впервые зашел на сервер или в случае окончания прав на цвет ника, который у него стоял ранее")]
public String NickDefault = "#33CCCC";
[JsonProperty(LanguageEn ? "This chat color will be set if the player entered the server for the first time or in case of expiration of the rights to the chat color that he had earlier" : "Данный цвет чата установится если игрок впервые зашел на сервер или в случае окончания прав на цвет чата, который у него стоял ранее")]
public String MessageDefault = "#0099FF";
}
internal class Turned {
[JsonProperty(LanguageEn ? "Set automatically a prefix to a player when he got the rights to it" : "Устанавливать автоматически префикс игроку, когда он получил права на него")]
public Boolean TurnAutoSetupPrefix;
[JsonProperty(LanguageEn ? "Set automatically the color of the nickname to the player when he got the rights to it" : "Устанавливать автоматически цвет ника игроку, когда он получил права на него")]
public Boolean TurnAutoSetupColorNick;
[JsonProperty(LanguageEn ? "Set the chat color automatically to the player when he got the rights to it" : "Устанавливать автоматически цвет чата игроку, когда он получил права на него")]
public Boolean TurnAutoSetupColorChat;
[JsonProperty(LanguageEn ? "Automatically reset the prefix when the player's rights to it expire" : "Сбрасывать автоматически префикс при окончании прав на него у игрока")]
public Boolean TurnAutoDropPrefix;
[JsonProperty(LanguageEn ? "Automatically reset the color of the nickname when the player's rights to it expire" : "Сбрасывать автоматически цвет ника при окончании прав на него у игрока")]
public Boolean TurnAutoDropColorNick;
[JsonProperty(LanguageEn ? "Automatically reset the color of the chat when the rights to it from the player expire" : "Сбрасывать автоматически цвет чата при окончании прав на него у игрока")]
public Boolean TurnAutoDropColorChat;
}
}
[JsonProperty(LanguageEn ? "Setting options for the player" : "Настройка параметров для игрока")]
public ControllerParameters ControllerParameter = new ControllerParameters();
internal class ControllerParameters {
[JsonProperty(LanguageEn ? "Setting the display of options for player selection" : "Настройка отображения параметров для выбора игрока")]
public VisualSettingParametres VisualParametres = new VisualSettingParametres();
[JsonProperty(LanguageEn ? "List and customization of colors for a nickname" : "Список и настройка цветов для ника")]
public List<AdvancedFuncion> NickColorList = new List<AdvancedFuncion>();
[JsonProperty(LanguageEn ? "List and customize colors for chat messages" : "Список и настройка цветов для сообщений в чате")]
public List<AdvancedFuncion> MessageColorList = new List<AdvancedFuncion>();
[JsonProperty(LanguageEn ? "List and configuration of prefixes in chat" : "Список и настройка префиксов в чате")]
public PrefixSetting Prefixes = new PrefixSetting();
internal class PrefixSetting {
[JsonProperty(LanguageEn ? "Enable support for multiple prefixes at once (true - multiple prefixes can be set/false - only 1 can be set to choose from)" : "Включить поддержку нескольких префиксов сразу (true - можно установить несколько префиксов/false - установить можно только 1 на выбор)")]
public Boolean TurnMultiPrefixes;
[JsonProperty(LanguageEn ? "The maximum number of prefixes that can be set at a time (This option only works if setting multiple prefixes is enabled)" : "Максимальное количество префиксов, которое можно установить за раз(Данный параметр работает только если включена установка нескольких префиксов)")]
public Int32 MaximumMultiPrefixCount;
[JsonProperty(LanguageEn ? "List of prefixes and their settings" : "Список префиксов и их настройка")]
public List<AdvancedFuncion> Prefixes = new List<AdvancedFuncion>();
}
internal class AdvancedFuncion {
[JsonProperty(LanguageEn ? "Permission" : "Права")]
public String Permissions;
[JsonProperty(LanguageEn ? "Argument" : "Значение")]
public String Argument;
}
internal class VisualSettingParametres {
[JsonProperty(LanguageEn ? "Player prefix selection display type - (0 - dropdown list, 1 - slider (Please note that if you have multi-prefix enabled, the dropdown list will be set))" : "Тип отображения выбора префикса для игрока - (0 - выпадающий список, 1 - слайдер (Учтите, что если у вас включен мульти-префикс, будет установлен выпадающий список))")]
public SelectedParametres PrefixType;
[JsonProperty(LanguageEn ? "Display type of player's nickname color selection - (0 - drop-down list, 1 - slider)" : "Тип отображения выбора цвета ника для игрока - (0 - выпадающий список, 1 - слайдер)")]
public SelectedParametres NickColorType;
[JsonProperty(LanguageEn ? "Display type of message color choice for the player - (0 - drop-down list, 1 - slider)" : "Тип отображения выбора цвета сообщения для игрока - (0 - выпадающий список, 1 - слайдер)")]
public SelectedParametres ChatColorType;
[JsonProperty(LanguageEn ? "IQRankSystem : Player rank selection display type - (0 - drop-down list, 1 - slider)" : "IQRankSystem : Тип отображения выбора ранга для игрока - (0 - выпадающий список, 1 - слайдер)")]
public SelectedParametres IQRankSystemType;
}
}
[JsonProperty(LanguageEn ? "Plugin mute settings" : "Настройка мута в плагине")]
public ControllerMute ControllerMutes = new ControllerMute();
internal class ControllerMute {
[JsonProperty(LanguageEn ? "Setting up automatic muting" : "Настройка автоматического мута")]
public AutoMute AutoMuteSettings = new AutoMute();
internal class AutoMute {
[JsonProperty(LanguageEn ? "Enable automatic muting for forbidden words (true - yes/false - no)" : "Включить автоматический мут по запрещенным словам(true - да/false - нет)")]
public Boolean UseAutoMute;
[JsonProperty(LanguageEn ? "Reason for automatic muting" : "Причина автоматического мута")]
public Muted AutoMuted;
}
[JsonProperty(LanguageEn ? "Additional setting for logging about mutes in discord" : "Дополнительная настройка для логирования о мутах в дискорд")]
public LoggedFuncion LoggedMute = new LoggedFuncion();
internal class LoggedFuncion {
[JsonProperty(LanguageEn ? "Support for logging the last N messages (Discord logging about mutes must be enabled)" : "Поддержка логирования последних N сообщений (Должно быть включено логирование в дискорд о мутах)")]
public Boolean UseHistoryMessage;
[JsonProperty(LanguageEn ? "How many latest player messages to send in logging" : "Сколько последних сообщений игрока отправлять в логировании")]
public Int32 CountHistoryMessage;
}
[JsonProperty(LanguageEn ? "Reasons to block chat" : "Причины для блокировки чата")]
public List<Muted> MuteChatReasons = new List<Muted>();
[JsonProperty(LanguageEn ? "Reasons to block your voice" : "Причины для блокировки голоса")]
public List<Muted> MuteVoiceReasons = new List<Muted>();
internal class Muted {
[JsonProperty(LanguageEn ? "Reason for blocking" : "Причина для блокировки")]
public String Reason;
[JsonProperty(LanguageEn ? "Block time (in seconds)" : "Время блокировки(в секундах)")]
public Int32 SecondMute;
}
}
[JsonProperty(LanguageEn ? "Configuring Message Processing" : "Настройка обработки сообщений")]
public ControllerMessage ControllerMessages = new ControllerMessage();
internal class ControllerMessage {
[JsonProperty(LanguageEn ? "Basic settings for chat messages from the plugin" : "Основная настройка сообщений в чат от плагина")]
public GeneralSettings GeneralSetting = new GeneralSettings();
[JsonProperty(LanguageEn ? "Configuring functionality switching in chat" : "Настройка переключения функционала в чате")]
public TurnedFuncional TurnedFunc = new TurnedFuncional();
[JsonProperty(LanguageEn ? "Player message formatting settings" : "Настройка форматирования сообщений игроков")]
public FormattingMessage Formatting = new FormattingMessage();
internal class GeneralSettings {
[JsonProperty(LanguageEn ? "Customizing the chat alert format" : "Настройка формата оповещения в чате")]
public BroadcastSettings BroadcastFormat = new BroadcastSettings();
[JsonProperty(LanguageEn ? "Setting the mention format in the chat, via @" : "Настройка формата упоминания в чате, через @")]
public AlertSettings AlertFormat = new AlertSettings();
[JsonProperty(LanguageEn ? "Additional setting" : "Дополнительная настройка")]
public OtherSettings OtherSetting = new OtherSettings();
internal class BroadcastSettings {
[JsonProperty(LanguageEn ? "The name of the notification in the chat" : "Наименование оповещения в чат")]
public String BroadcastTitle;
[JsonProperty(LanguageEn ? "Chat alert message color" : "Цвет сообщения оповещения в чат")]
public String BroadcastColor;
[JsonProperty(LanguageEn ? "Steam64ID for chat avatar" : "Steam64ID для аватарки в чате")]
public String Steam64IDAvatar;
}
internal class AlertSettings {
[JsonProperty(LanguageEn ? "The color of the player mention message in the chat" : "Цвет сообщения упоминания игрока в чате")]
public String AlertPlayerColor;
[JsonProperty(LanguageEn ? "Sound when receiving and sending a mention via @" : "Звук при при получении и отправки упоминания через @")]
public String SoundAlertPlayer;
}
internal class OtherSettings {
[JsonProperty(LanguageEn ? "Time after which the message will be deleted from the UI from the administrator" : "Время,через которое удалится сообщение с UI от администратора")]
public Int32 TimeDeleteAlertUI;
[JsonProperty(LanguageEn ? "The size of the message from the player in the chat" : "Размер сообщения от игрока в чате")]
public Int32 SizeMessage = 14;
[JsonProperty(LanguageEn ? "Player nickname size in chat" : "Размер ника игрока в чате")]
public Int32 SizeNick = 14;
[JsonProperty(LanguageEn ? "The size of the player's prefix in the chat (will be used if <size=N></size> is not set in the prefix itself)" : "Размер префикса игрока в чате (будет использовано, если в самом префиксе не установвлен <size=N></size>)")]
public Int32 SizePrefix = 14;
}
}
internal class TurnedFuncional {
[JsonProperty(LanguageEn ? "Configuring spam protection" : "Настройка защиты от спама")]
public AntiSpam AntiSpamSetting = new AntiSpam();
[JsonProperty(LanguageEn ? "Setting up a temporary chat block for newbies (who have just logged into the server)" : "Настройка временной блокировки чата новичкам (которые только зашли на сервер)")]
public AntiNoob AntiNoobSetting = new AntiNoob();
[JsonProperty(LanguageEn ? "Setting up private messages" : "Настройка личных сообщений")]
public PM PMSetting = new PM();
internal class AntiNoob {
[JsonProperty(LanguageEn ? "Newbie protection in PM/R" : "Защита от новичка в PM/R")]
public Settings AntiNoobPM = new Settings();
[JsonProperty(LanguageEn ? "Newbie protection in global and team chat" : "Защита от новичка в глобальном и коммандном чате")]
public Settings AntiNoobChat = new Settings();
internal class Settings {
[JsonProperty(LanguageEn ? "Enable protection?" : "Включить защиту?")]
public Boolean AntiNoobActivate = false;
[JsonProperty(LanguageEn ? "Newbie Chat Lock Time" : "Время блокировки чата для новичка")]
public Int32 TimeBlocked = 1200;
}
}
internal class AntiSpam {
[JsonProperty(LanguageEn ? "Enable spam protection (Anti-spam)" : "Включить защиту от спама (Анти-спам)")]
public Boolean AntiSpamActivate;
[JsonProperty(LanguageEn ? "Time after which a player can send a message (AntiSpam)" : "Время через которое игрок может отправлять сообщение (АнтиСпам)")]
public Int32 FloodTime;
[JsonProperty(LanguageEn ? "Additional Anti-Spam settings" : "Дополнительная настройка Анти-Спама")]
public AntiSpamDuples AntiSpamDuplesSetting = new AntiSpamDuples();
internal class AntiSpamDuples {
[JsonProperty(LanguageEn ? "Enable additional spam protection (Anti-duplicates, duplicate messages)" : "Включить дополнительную защиту от спама (Анти-дубликаты, повторяющие сообщения)")]
public Boolean AntiSpamDuplesActivate = true;
[JsonProperty(LanguageEn ? "How many duplicate messages does a player need to make to be confused by the system" : "Сколько дублирующих сообщений нужно сделать игроку чтобы его замутила система")]
public Int32 TryDuples = 3;
[JsonProperty(LanguageEn ? "Setting up automatic muting for duplicates" : "Настройка автоматического мута за дубликаты")]
public ControllerMute.Muted MuteSetting = new ControllerMute.Muted {
Reason = LanguageEn ? "Blocking for duplicate messages (SPAM)" : "Блокировка за дублирующие сообщения (СПАМ)", SecondMute = 300,
}
;
}
}
internal class PM {
[JsonProperty(LanguageEn ? "Enable Private Messages" : "Включить личные сообщения")]
public Boolean PMActivate;
[JsonProperty(LanguageEn ? "Sound when receiving a private message" : "Звук при при получении личного сообщения")]
public String SoundPM;
}
[JsonProperty(LanguageEn ? "Enable PM ignore for players (/ignore nick or via interface)" : "Включить игнор ЛС игрокам(/ignore nick или через интерфейс)")]
public Boolean IgnoreUsePM;
[JsonProperty(LanguageEn ? "Hide the issue of items to the Admin from the chat" : "Скрыть из чата выдачу предметов Админу")]
public Boolean HideAdminGave;
[JsonProperty(LanguageEn ? "Move mute to team chat (In case of a mute, the player will not be able to write even to the team chat)" : "Переносить мут в командный чат(В случае мута, игрок не сможет писать даже в командный чат)")]
public Boolean MuteTeamChat;
}
internal class FormattingMessage {
[JsonProperty(LanguageEn ? "Enable message formatting [Will control caps, message format] (true - yes/false - no)" : "Включить форматирование сообщений [Будет контроллировать капс, формат сообщения] (true - да/false - нет)")]
public Boolean FormatMessage;
[JsonProperty(LanguageEn ? "Use a list of banned words (true - yes/false - no)" : "Использовать список запрещенных слов (true - да/false - нет)")]
public Boolean UseBadWords;
[JsonProperty(LanguageEn ? "The word that will replace the forbidden word" : "Слово которое будет заменять запрещенное слово")]
public String ReplaceBadWord;
[JsonProperty(LanguageEn ? "List of banned words" : "Список запрещенных слов")]
public List<String> BadWords = new List<String>();
[JsonProperty(LanguageEn ? "Nickname controller setup" : "Настройка контроллера ников")]
public NickController ControllerNickname = new NickController();
internal class NickController {
[JsonProperty(LanguageEn ? "Enable player nickname formatting (message formatting must be enabled)" : "Включить форматирование ников игроков (должно быть включено форматирование сообщений)")]
public Boolean UseNickController = true;
[JsonProperty(LanguageEn ? "The word that will replace the forbidden word (You can leave it blank and it will just delete)" : "Слово которое будет заменять запрещенное слово (Вы можете оставить пустым и будет просто удалять)")]
public String ReplaceBadNick = "****";
[JsonProperty(LanguageEn ? "List of banned nicknames" : "Список запрещенных ников")]
public List<String> BadNicks = new List<String>();
}
}
}
[JsonProperty(LanguageEn ? "Setting up chat alerts" : "Настройка оповещений в чате")]
public ControllerAlert ControllerAlertSetting;
internal class ControllerAlert {
[JsonProperty(LanguageEn ? "Setting up chat alerts" : "Настройка оповещений в чате")]
public Alert AlertSetting;
[JsonProperty(LanguageEn ? "Setting notifications about the status of the player's session" : "Настройка оповещений о статусе сессии игрока")]
public PlayerSession PlayerSessionSetting;
[JsonProperty(LanguageEn ? "Configuring administrator session status alerts" : "Настройка оповещений о статусе сессии администратора")]
public AdminSession AdminSessionSetting;
[JsonProperty(LanguageEn ? "Setting up personal notifications to the player when connecting" : "Настройка персональных оповоещений игроку при коннекте")]
public PersonalAlert PersonalAlertSetting;
internal class Alert {
[JsonProperty(LanguageEn ? "Enable automatic messages in chat (true - yes/false - no)" : "Включить автоматические сообщения в чат (true - да/false - нет)")]
public Boolean AlertMessage;
[JsonProperty(LanguageEn ? "Type of automatic messages : true - sequential / false - random" : "Тип автоматических сообщений : true - поочередные/false - случайные")]
public Boolean AlertMessageType;
[JsonProperty(LanguageEn ? "List of automatic messages in chat" : "Список автоматических сообщений в чат")]
public List<String> MessageList;
[JsonProperty(LanguageEn ? "Interval for sending messages to chat (Broadcaster) (in seconds)" : "Интервал отправки сообщений в чат (Броадкастер) (в секундах)")]
public Int32 MessageListTimer;
}
internal class PlayerSession {
[JsonProperty(LanguageEn ? "When a player is notified about the entry / exit of the player, display his avatar opposite the nickname (true - yes / false - no)" : "При уведомлении о входе/выходе игрока отображать его аватар напротив ника (true - да/false - нет)")]
public Boolean ConnectedAvatarUse;
[JsonProperty(LanguageEn ? "Notify in chat when a player enters (true - yes/false - no)" : "Уведомлять в чате о входе игрока (true - да/false - нет)")]
public Boolean ConnectedAlert;
[JsonProperty(LanguageEn ? "Enable random notifications when a player from the list enters (true - yes / false - no)" : "Включить случайные уведомления о входе игрока из списка (true - да/false - нет)")]
public Boolean ConnectionAlertRandom;
[JsonProperty(LanguageEn ? "Show the country of the entered player (true - yes/false - no)" : "Отображать страну зашедшего игрока (true - да/false - нет")]
public Boolean ConnectedWorld;
[JsonProperty(LanguageEn ? "Notify when a player enters the chat (selected from the list) (true - yes/false - no)" : "Уведомлять о выходе игрока в чат(выбираются из списка) (true - да/false - нет)")]
public Boolean DisconnectedAlert;
[JsonProperty(LanguageEn ? "Enable random player exit notifications (true - yes/false - no)" : "Включить случайные уведомления о выходе игрока (true - да/false - нет)")]
public Boolean DisconnectedAlertRandom;
[JsonProperty(LanguageEn ? "Display reason for player exit (true - yes/false - no)" : "Отображать причину выхода игрока (true - да/false - нет)")]
public Boolean DisconnectedReason;
[JsonProperty(LanguageEn ? "Random player entry notifications({0} - player's nickname, {1} - country (if country display is enabled)" : "Случайные уведомления о входе игрока({0} - ник игрока, {1} - страна(если включено отображение страны)")]
public List<String> RandomConnectionAlert = new List<String>();
[JsonProperty(LanguageEn ? "Random notifications about the exit of the player ({0} - player's nickname, {1} - the reason for the exit (if the reason is enabled)" : "Случайные уведомления о выходе игрока({0} - ник игрока, {1} - причина выхода(если включена причина)")]
public List<String> RandomDisconnectedAlert = new List<String>();
}
internal class AdminSession {
[JsonProperty(LanguageEn ? "Notify admin on the server in the chat (true - yes/false - no)" : "Уведомлять о входе админа на сервер в чат (true - да/false - нет)")]
public Boolean ConnectedAlertAdmin;
[JsonProperty(LanguageEn ? "Notify about admin leaving the server in chat (true - yes/false - no)" : "Уведомлять о выходе админа на сервер в чат (true - да/false - нет)")]
public Boolean DisconnectedAlertAdmin;
}
internal class PersonalAlert {
[JsonProperty(LanguageEn ? "Enable random message to the player who has logged in (true - yes/false - no)" : "Включить случайное сообщение зашедшему игроку (true - да/false - нет)")]
public Boolean UseWelcomeMessage;
[JsonProperty(LanguageEn ? "List of messages to the player when entering" : "Список сообщений игроку при входе")]
public List<String> WelcomeMessage = new List<String>();
}
}
[JsonProperty(LanguageEn ? "Settings Rust+" : "Настройка Rust+")]
public RustPlus RustPlusSettings;
internal class RustPlus {
[JsonProperty(LanguageEn ? "Use Rust+" : "Использовать Rust+")]
public Boolean UseRustPlus;
[JsonProperty(LanguageEn ? "Title for notification Rust+" : "Название для уведомления Rust+")]
public String DisplayNameAlert;
}
[JsonProperty(LanguageEn ? "Configuring support plugins" : "Настройка плагинов поддержки")]
public ReferenceSettings ReferenceSetting = new ReferenceSettings();
internal class ReferenceSettings {
[JsonProperty(LanguageEn ? "Settings IQFakeActive" : "Настройка IQFakeActive")]
public IQFakeActive IQFakeActiveSettings = new IQFakeActive();
[JsonProperty(LanguageEn ? "Settings IQRankSystem" : "Настройка IQRankSystem")]
public IQRankSystem IQRankSystems = new IQRankSystem();
internal class IQRankSystem {
[JsonProperty(LanguageEn ? "Rank display format in chat
// ... [Code preview truncated due to length. Full source in attached file] ...