/pm (/w) with names, #userid, SteamIDs, @me, @aim, @random, @randomt and @randomct, /r to reply, and /block, /blocklist, /unblock. Lines use CS2-Tags' rank prefixes and colours: >[[M] Kalus -> me] message. Gagged players can't send; blocks stop everyone but staff. Messages are kept in CS2-SimpleAdmin's database while History is on (css_whisper_history).
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using System.Text.Json.Serialization;
|
|
using CounterStrikeSharp.API.Core;
|
|
|
|
namespace Whisper;
|
|
|
|
public sealed class WhisperConfig : BasePluginConfig
|
|
{
|
|
// Keep each message (sender, recipient, both teams and alive/dead, map, time) in wh_messages.
|
|
// css_whisper_history on|off changes it and saves this file.
|
|
[JsonPropertyName("History")]
|
|
public bool History { get; set; } = true;
|
|
|
|
// How the line is drawn: Open, then the sender's rank prefix and name, Arrow, the recipient
|
|
// (Me on the recipient's own line), Close, then the message. Colour tags like {Default}.
|
|
[JsonPropertyName("Open")]
|
|
public string Open { get; set; } = "{Default}>[";
|
|
|
|
[JsonPropertyName("Arrow")]
|
|
public string Arrow { get; set; } = "{Default}→";
|
|
|
|
[JsonPropertyName("Me")]
|
|
public string Me { get; set; } = "{Default}me";
|
|
|
|
[JsonPropertyName("Close")]
|
|
public string Close { get; set; } = "{Default}]";
|
|
|
|
// CS2-Tags' file, read for each player's rank prefix and colours.
|
|
[JsonPropertyName("TagsFile")]
|
|
public string TagsFile { get; set; } = "configs/plugins/CS2-Tags/tags.json";
|
|
|
|
[JsonPropertyName("CooldownSeconds")]
|
|
public double CooldownSeconds { get; set; } = 1;
|
|
|
|
[JsonPropertyName("MaxMessageLength")]
|
|
public int MaxMessageLength { get; set; } = 200;
|
|
|
|
[JsonPropertyName("MaxBlocks")]
|
|
public int MaxBlocks { get; set; } = 100;
|
|
|
|
// Who gets through blocks and can find admins hidden with css_hide.
|
|
[JsonPropertyName("StaffPermission")]
|
|
public string StaffPermission { get; set; } = "@css/generic";
|
|
|
|
// Writes kept on disk while the database is down.
|
|
[JsonPropertyName("SpoolMaxEntries")]
|
|
public int SpoolMaxEntries { get; set; } = 20000;
|
|
|
|
[JsonPropertyName("ConfigVersion")]
|
|
public override int Version { get; set; } = 1;
|
|
}
|