Skip to content

Commit

Permalink
adds two day ban to drop down on for issue #47 remove IW5 (Pluto) fro…
Browse files Browse the repository at this point in the history
…m supported client until it's rewritten
  • Loading branch information
RaidMax committed Sep 14, 2018
1 parent 9295f9a commit 46969fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@
### Version 2.2
_______
### About
**IW4MAdmin** is an administration tool for [IW4x](https://iw4xcachep26muba.onion.link/), [Pluto T6](https://forum.plutonium.pw/category/33/plutonium-t6), [Pluto IW5](https://forum.plutonium.pw/category/5/plutonium-iw5), and most Call of Duty® dedicated servers. It allows complete control of your server; from changing maps, to banning players, **IW4MAdmin** monitors and records activity on your server(s). With plugin support, extending its functionality is a breeze.
**IW4MAdmin** is an administration tool for [IW4x](https://iw4xcachep26muba.onion.link/), [Pluto T6](https://forum.plutonium.pw/category/33/plutonium-t6), ~~[Pluto IW5](https://forum.plutonium.pw/category/5/plutonium-iw5)~~, and most Call of Duty® dedicated servers. It allows complete control of your server; from changing maps, to banning players, **IW4MAdmin** monitors and records activity on your server(s). With plugin support, extending its functionality is a breeze.
### Download
Latest binary builds are always available at https://raidmax.org/IW4MAdmin

Expand Down
3 changes: 1 addition & 2 deletions SharedLibraryCore/Localization/Layout.cs
Expand Up @@ -29,8 +29,7 @@ public class Index
{
if (!Set.TryGetValue(key, out string value))
{
// throw new Exception($"Invalid locale key {key}");
return $"unknown locale key {key}";
return key;
}
return value;
}
Expand Down
10 changes: 7 additions & 3 deletions WebfrontCore/Controllers/ActionController.cs
Expand Up @@ -34,8 +34,9 @@ public IActionResult BanForm()
{"1", $"1 {Localization["GLOBAL_TIME_HOUR"]}" },
{"2", $"6 {Localization["GLOBAL_TIME_HOURS"]}" },
{"3", $"1 {Localization["GLOBAL_TIME_DAY"]}" },
{"4", $"1 {Localization["GLOBAL_TIME_WEEK"]}" },
{"5", $"{Localization["WEBFRONT_ACTION_SELECTION_PERMANENT"]}" },
{"4", $"2 {Localization["GLOBAL_TIME_DAYS"]}" },
{"5", $"1 {Localization["GLOBAL_TIME_WEEK"]}" },
{"6", $"{Localization["WEBFRONT_ACTION_SELECTION_PERMANENT"]}" },
}
}
},
Expand All @@ -61,11 +62,14 @@ public async Task<IActionResult> BanAsync(int targetId, string Reason, int Durat
duration = "1d";
break;
case 4:
duration = "2d";
break;
case 5:
duration = "1w";
break;
}

string command = Duration == 5 ?
string command = Duration == 6 ?
$"!ban @{targetId} {Reason}" :
$"!tempban @{targetId} {duration} {Reason}";

Expand Down

0 comments on commit 46969fc

Please sign in to comment.