1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-11 23:58:08 -05:00

tweaked rcon throttle rate/made async

increased cutoff for server overview messages
dont print message if timed out
This commit is contained in:
RaidMax
2018-04-02 00:25:06 -05:00
parent 71313b76d9
commit 3e094b0b61
21 changed files with 441 additions and 337 deletions

View File

@ -24,7 +24,9 @@ namespace WebfrontCore.Controllers
try
{
User.ClientId = Manager.PrivilegedClients[context.HttpContext.Connection.RemoteIpAddress.ToString().ConvertToIP()];
var client = Manager.PrivilegedClients[context.HttpContext.Connection.RemoteIpAddress.ToString().ConvertToIP()];
User.ClientId = client.ClientId;
User.Level = client.Level;
}
catch (KeyNotFoundException)
@ -36,11 +38,16 @@ namespace WebfrontCore.Controllers
User.ClientId >= 0;
ViewBag.Authorized = Authorized;
ViewBag.Url = Startup.Configuration["Web:Address"];
string inviteLink = Manager.GetApplicationSettings().Configuration().DiscordInviteCode;
if (inviteLink != null)
ViewBag.DiscordLink = inviteLink.Contains("https") ? inviteLink : $"https://discordapp.com/invite/{inviteLink}";
else
ViewBag.DiscordLink = "";
ViewBag.User = User;
if (Manager.GetApplicationSettings().Configuration().EnableDiscordLink)
{
string inviteLink = Manager.GetApplicationSettings().Configuration().DiscordInviteCode;
if (inviteLink != null)
ViewBag.DiscordLink = inviteLink.Contains("https") ? inviteLink : $"https://discordapp.com/invite/{inviteLink}";
else
ViewBag.DiscordLink = "";
}
base.OnActionExecuting(context);
}
}