mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
SPM fix for negative/teamdamage
added localization as downloaded from the Master API interupted network communication no longer treated as unknown exception topstats prints the right message if no one qualifies angle adjustments move unflag to seperate command
This commit is contained in:
@ -668,6 +668,7 @@ namespace SharedLibraryCore.Commands
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class CFlag : Command
|
||||
{
|
||||
public CFlag() :
|
||||
@ -697,9 +698,7 @@ namespace SharedLibraryCore.Commands
|
||||
|
||||
if (E.Target.Level == Player.Permission.Flagged)
|
||||
{
|
||||
E.Target.Level = Player.Permission.User;
|
||||
await E.Owner.Manager.GetClientService().Update(E.Target);
|
||||
await E.Origin.Tell($"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_FLAG_UNFLAG"]} ^5{E.Target.Name}");
|
||||
await E.Origin.Tell($"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_FLAG_ALREADYFLAGGED"]}");
|
||||
}
|
||||
|
||||
else
|
||||
@ -726,6 +725,42 @@ namespace SharedLibraryCore.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public class CUnflag : Command
|
||||
{
|
||||
public CUnflag() :
|
||||
base("unflag", Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_UNFLAG_DESC"], "uf", Player.Permission.Moderator, true, new CommandArgument[]
|
||||
{
|
||||
new CommandArgument()
|
||||
{
|
||||
Name = Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_ARGS_PLAYER"],
|
||||
Required = true
|
||||
}
|
||||
})
|
||||
{ }
|
||||
|
||||
public override async Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
if (E.Target.Level >= E.Origin.Level)
|
||||
{
|
||||
await E.Origin.Tell($"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_UNFLAG_FAIL"]} ^5{E.Target.Name}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (E.Target.Level == Player.Permission.Flagged)
|
||||
{
|
||||
E.Target.Level = Player.Permission.User;
|
||||
await E.Owner.Manager.GetClientService().Update(E.Target);
|
||||
await E.Origin.Tell($"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_FLAG_UNFLAG"]} ^5{E.Target.Name}");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
await E.Origin.Tell(Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_UNFLAG_NOTFLAGGED"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class CReport : Command
|
||||
{
|
||||
public CReport() :
|
||||
@ -860,7 +895,7 @@ namespace SharedLibraryCore.Commands
|
||||
}
|
||||
|
||||
string timeRemaining = penalty.Type == Penalty.PenaltyType.TempBan ? $"({(penalty.Expires - DateTime.UtcNow).TimeSpanText()} remaining)" : "";
|
||||
string success = Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_BANINO_SUCCESS"];
|
||||
string success = Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_BANINFO_SUCCESS"];
|
||||
|
||||
await E.Origin.Tell($"^1{E.Target.Name} ^7{string.Format(success, penalty.Punisher.Name)} {penalty.Punisher.Name} {timeRemaining}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user