mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
removed reload command
prevent control characters from being used in name added MOD_HEAD_SHOT to hit location increment css fix for alias dropdown testing view angle analysis
This commit is contained in:
@ -187,7 +187,6 @@ namespace IW4MAdmin
|
||||
Commands.Add(new CFindPlayer());
|
||||
Commands.Add(new CListRules());
|
||||
Commands.Add(new CPrivateMessage());
|
||||
Commands.Add(new CReload());
|
||||
Commands.Add(new CFlag());
|
||||
Commands.Add(new CReport());
|
||||
Commands.Add(new CListReports());
|
||||
|
@ -31,7 +31,7 @@ namespace IW4MAdmin
|
||||
|
||||
override public async Task<bool> AddPlayer(Player polledPlayer)
|
||||
{
|
||||
if (polledPlayer.Ping == 999 || polledPlayer.Ping < 1 || polledPlayer.ClientNumber > (MaxClients) || polledPlayer.ClientNumber < 0)
|
||||
if (/*polledPlayer.Ping == 999 ||*/ polledPlayer.Ping < 1 || polledPlayer.ClientNumber > (MaxClients) || polledPlayer.ClientNumber < 0)
|
||||
{
|
||||
//Logger.WriteDebug($"Skipping client not in connected state {P}");
|
||||
return true;
|
||||
@ -69,6 +69,13 @@ namespace IW4MAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
if (polledPlayer.Name.Where(c => Char.IsControl(c)).Count() > 0)
|
||||
{
|
||||
Logger.WriteDebug($"Kicking {polledPlayer} because their contains control characters");
|
||||
await this.ExecuteCommandAsync($"clientkick {polledPlayer.ClientNumber} \"Your name cannot contain control characters.\"");
|
||||
return false;
|
||||
}
|
||||
|
||||
Logger.WriteDebug($"Client slot #{polledPlayer.ClientNumber} now reserved");
|
||||
|
||||
try
|
||||
@ -618,7 +625,7 @@ namespace IW4MAdmin
|
||||
#if DEBUG
|
||||
{
|
||||
basepath.Value = (GameName == Game.IW4) ?
|
||||
@"Z:\" :
|
||||
@"D:\" :
|
||||
@"\\tsclient\G\Program Files (x86)\Steam\SteamApps\common\Call of Duty 4";
|
||||
}
|
||||
|
||||
@ -956,23 +963,6 @@ namespace IW4MAdmin
|
||||
await Manager.GetPenaltyService().RemoveActivePenalties(Target.AliasLink.AliasLinkId);
|
||||
}
|
||||
|
||||
public override bool Reload()
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeMaps();
|
||||
InitializeAutoMessages();
|
||||
return true;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
Logger.WriteError("Unable to reload configs! - " + E.Message);
|
||||
BroadcastMessages = new List<String>();
|
||||
Maps = new List<Map>();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
override public void InitializeTokens()
|
||||
{
|
||||
Manager.GetMessageTokens().Add(new SharedLibrary.Helpers.MessageToken("TOTALPLAYERS", Manager.GetClientService().GetTotalClientsAsync().Result.ToString));
|
||||
|
@ -23,7 +23,7 @@ namespace WebfrontCore.Controllers
|
||||
ViewBag.Authorized = Authorized;
|
||||
ViewBag.Url = Startup.Configuration["Web:Address"];
|
||||
string inviteLink = Manager.GetApplicationSettings().Configuration().DiscordInviteCode;
|
||||
ViewBag.DiscordLink = inviteLink.Contains("http") ? inviteLink : $"https://discordapp.com/invite/{inviteLink}";
|
||||
ViewBag.DiscordLink = inviteLink != null && inviteLink.Contains("http") ? inviteLink : $"https://discordapp.com/invite/{inviteLink}";
|
||||
base.OnActionExecuting(context);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
@model SharedLibrary.Dtos.PlayerInfo
|
||||
@{
|
||||
@{
|
||||
string match = System.Text.RegularExpressions.Regex.Match(Model.Name.ToUpper(), "[A-Z]").Value;
|
||||
string shortCode = match == string.Empty ? "?" : match;
|
||||
}
|
||||
@ -14,47 +14,47 @@
|
||||
<h1>
|
||||
<span class="client-name mr-4">
|
||||
@Model.Name
|
||||
@if (Model.Aliases.Count > 0 || ViewBag.Authorized)
|
||||
{
|
||||
<span id="profile_aliases_btn" class="oi oi-caret-bottom pl-2"></span>
|
||||
}
|
||||
|
||||
</span>
|
||||
</h1>
|
||||
<div id="profile_aliases" class="pr-0 pr-sm-4 pb-2 mb-2 text-muted">
|
||||
@{
|
||||
foreach (string alias in Model.Aliases)
|
||||
{
|
||||
@alias <br />
|
||||
}
|
||||
|
||||
if (ViewBag.Authorized)
|
||||
{
|
||||
foreach (string ip in Model.IPs)
|
||||
@if (Model.Aliases.Count > 0 || ViewBag.Authorized)
|
||||
{
|
||||
<a class="ip-locate-link" href="#" data-ip="@ip">@ip</a><br/>
|
||||
<span id="profile_aliases_btn" class="oi oi-caret-bottom pl-2"></span>
|
||||
}
|
||||
|
||||
</span>
|
||||
</h1>
|
||||
<div id="profile_aliases" class="pr-0 pr-sm-4 pb-2 mb-2 text-muted">
|
||||
@{
|
||||
foreach (string alias in Model.Aliases)
|
||||
{
|
||||
@alias <br />
|
||||
}
|
||||
|
||||
if (ViewBag.Authorized)
|
||||
{
|
||||
foreach (string ip in Model.IPs)
|
||||
{
|
||||
<a class="ip-locate-link" href="#" data-ip="@ip">@ip</a><br />
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div id="profile_level" class="text-muted mb-2">
|
||||
<h5><span class="level-color-@Model.Level.ToLower()"><strong>@Model.Level</strong></span></h5>
|
||||
</div>
|
||||
<div id="profile_time_played" class="text-muted">
|
||||
Played <span class="text-primary">@Model.TimePlayed</span> hours
|
||||
</div>
|
||||
<div id="profile_first_seen" class="text-muted">
|
||||
First seen <span class="text-primary">@Model.FirstSeen</span> ago
|
||||
</div>
|
||||
<div id="profile_last_seen" class="text-muted">
|
||||
Last seen <span class="text-primary">@Model.LastSeen</span> ago
|
||||
</div>
|
||||
</div>
|
||||
<div id="profile_level" class="text-muted mb-2">
|
||||
<h5><span class="level-color-@Model.Level.ToLower()"><strong>@Model.Level</strong></span></h5>
|
||||
</div>
|
||||
<div id="profile_time_played" class="text-muted">
|
||||
Played <span class="text-primary">@Model.TimePlayed</span> hours
|
||||
</div>
|
||||
<div id="profile_first_seen" class="text-muted">
|
||||
First seen <span class="text-primary">@Model.FirstSeen</span> ago
|
||||
</div>
|
||||
<div id="profile_last_seen" class="text-muted">
|
||||
Last seen <span class="text-primary">@Model.LastSeen</span> ago
|
||||
</div>
|
||||
</div>
|
||||
<div id="profile_meta" class="text-center text-sm-right pt-2 mt-md-4 pt-md-3 mr-4 pr-4 mr-md-0 ml-4 pl-4 ml-md-0 pr-md-0 pl-md-0">
|
||||
<div id="profile_meta" class="text-center text-sm-right pt-2 mt-md-4 pt-md-3 mr-4 pr-4 mr-md-0 ml-4 pl-4 ml-md-0 pr-md-0 pl-md-0">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row d-md-flex pt-2">
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
<tr class="d-table-row d-md-none bg-dark">
|
||||
<th scope="row" class="w-25 bg-primary" style="border-bottom: 1px solid #222">Time/Left</th>
|
||||
<td class="text-light mb-2 border-bottom">
|
||||
<td class="text-light mb-2 border-bottom">
|
||||
@{
|
||||
if (Model.TimeRemaining == string.Empty)
|
||||
{
|
||||
@ -48,7 +48,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="d-none d-md-table-row">
|
||||
<td>
|
||||
@Html.ActionLink(Model.OffenderName, "ProfileAsync", "Client", new { id = Model.OffenderId }, new { @class = "link-inverse" })
|
||||
|
@ -6,7 +6,7 @@
|
||||
<title>@ViewBag.Title | IW4MAdmin</title>
|
||||
<meta property="og:title" content="@ViewBag.Title | IW4MAdmin">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="/favicon.ico">
|
||||
<meta property="og:image" content="/images/icon.png">
|
||||
<meta property="og:description" content="@ViewBag.Description">
|
||||
<meta property="og:url" content="@ViewBag.Url">
|
||||
<meta name="description" content="@ViewBag.Description">
|
||||
|
@ -100,7 +100,7 @@
|
||||
}
|
||||
|
||||
#profile_aliases_btn {
|
||||
position: absolute;
|
||||
position: relative;
|
||||
top: auto;
|
||||
margin-top: 0.7em;
|
||||
font-size: 0.5em;
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 9.5 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 8.2 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 11 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 12 KiB |
BIN
WebfrontCore/wwwroot/images/icon.png
Normal file
BIN
WebfrontCore/wwwroot/images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user