mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
Mute Banner for Profile & Prevent Self-Target & Correctly Expire Early Unmutes (#272)
* Fix self-targeting
Remove creation of penalty on mute expiration
* Display mute penalties on profile
Expire mute penalties on unmute
* Resolves issues in code review
Added comment in ClientController.cs
Fixed order of operations in MuteManager.cs
Fixed condition in MuteManager.cs
* Fix self-targeting
Remove creation of penalty on mute expiration
* Display mute penalties on profile
Expire mute penalties on unmute
* Resolves issues in code review
Added comment in ClientController.cs
Fixed order of operations in MuteManager.cs
Fixed condition in MuteManager.cs
* Changed localisation value to be more generic
Fix null reference warning (it should never be null) (34da216
)
This commit is contained in:
@ -34,6 +34,12 @@ public class UnmuteCommand : Command
|
||||
|
||||
public override async Task ExecuteAsync(GameEvent gameEvent)
|
||||
{
|
||||
if (gameEvent.Origin.ClientId == gameEvent.Target.ClientId)
|
||||
{
|
||||
gameEvent.Origin.Tell(_translationLookup["COMMANDS_DENY_SELF_TARGET"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (await Plugin.MuteManager.Unmute(gameEvent.Owner, gameEvent.Origin, gameEvent.Target, gameEvent.Data))
|
||||
{
|
||||
gameEvent.Origin.Tell(_translationLookup["PLUGINS_MUTE_COMMANDS_UNMUTE_UNMUTED"]
|
||||
|
Reference in New Issue
Block a user