zio fork: @ staff chat while gagged, gag message with time left and reason
Gagged or silenced players can still send @ team chat to online staff. The chat-blocked message now says how long the gag or silence has left, or that it's permanent, and why. Reasons are kept in memory alongside each penalty. Adds release.sh, which ships CS2-SimpleAdmin.dll and lang/en.json.
This commit is contained in:
parent
cf284bd121
commit
6171162ae9
10 changed files with 230 additions and 11 deletions
|
|
@ -125,20 +125,22 @@ internal class PlayerManager
|
|||
string muteType = mute.type;
|
||||
DateTime ends = mute.ends;
|
||||
int duration = mute.duration;
|
||||
string? reason = mute.reason;
|
||||
int passed = mute.passed is null ? 0 : (int)mute.passed;
|
||||
switch (muteType)
|
||||
{
|
||||
// Apply mute penalty based on mute type
|
||||
case "GAG":
|
||||
PlayerPenaltyManager.AddPenalty(
|
||||
CS2_SimpleAdmin.PlayersInfo[steamId].Slot,
|
||||
PenaltyType.Gag, ends, duration);
|
||||
PenaltyType.Gag, ends, duration, reason, duration - passed);
|
||||
// if (CS2_SimpleAdmin._localizer != null)
|
||||
// mutesList[PenaltyType.Gag].Add(CS2_SimpleAdmin._localizer["sa_player_penalty_info_active_gag", ends.ToLocalTime().ToString(CultureInfo.CurrentCulture)]);
|
||||
break;
|
||||
case "MUTE":
|
||||
PlayerPenaltyManager.AddPenalty(
|
||||
CS2_SimpleAdmin.PlayersInfo[steamId].Slot,
|
||||
PenaltyType.Mute, ends, duration);
|
||||
PenaltyType.Mute, ends, duration, reason, duration - passed);
|
||||
await Server.NextWorldUpdateAsync(() =>
|
||||
{
|
||||
player.VoiceFlags = VoiceFlags.Muted;
|
||||
|
|
@ -149,7 +151,7 @@ internal class PlayerManager
|
|||
default:
|
||||
PlayerPenaltyManager.AddPenalty(
|
||||
CS2_SimpleAdmin.PlayersInfo[steamId].Slot,
|
||||
PenaltyType.Silence, ends, duration);
|
||||
PenaltyType.Silence, ends, duration, reason, duration - passed);
|
||||
await Server.NextWorldUpdateAsync(() =>
|
||||
{
|
||||
player.VoiceFlags = VoiceFlags.Muted;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue