fixed bug with lifetime hit ratio causing erroneous ban

ip lookup on profile shows error if failed
truncate chat messages over 50 characters
removed html raw on client messages :c
show client rank colors on server overview if authorized
break long messages on profile page
prevent masked status showing up to non privileged users in webfront
This commit is contained in:
RaidMax
2018-03-28 22:01:09 -05:00
parent 233aeeb12f
commit 9db8ad80ef
9 changed files with 36 additions and 21 deletions

View File

@ -8,7 +8,7 @@
@{
for (int i = 0; i < Model.ChatHistory.Length; i++)
{
string message = "&ndash; " + @Model.ChatHistory[i].Message;
string message = @Model.ChatHistory[i].Message;
if (Model.ChatHistory[i].Message == "CONNECTED")
{
<span class="text-light"><span class="oi oi-account-login mr-2 text-success"> </span>@Model.ChatHistory[i].Name</span><br />
@ -20,7 +20,7 @@
}
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
{
<span class="text-light">@Model.ChatHistory[i].Name</span><span> @Html.Raw(@message) </span><br />
<span class="text-light">@Model.ChatHistory[i].Name</span><span> &mdash; @message.Substring(0, Math.Min(50, message.Length - 1)) </span><br />
}
}
}
@ -31,7 +31,8 @@
@{
for (int i = 0; i < half; i++)
{
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId })</span><br />
string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].Level.ToLower()}";
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId }, new { @class=levelColorClass })</span><br />
}
}
</div>
@ -39,7 +40,8 @@
@{
for (int i = half; i < Model.ClientCount; i++)
{
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId })</span><br />
string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].Level.ToLower()}";
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId }, new { @class = levelColorClass })</span><br />
}
}
</div>