fixed !setlevel

fixed previous alias displayed on welcome announcement
fixed duplicate events on profile page
tweaked display of non event meta on mobile
you can view other's stats from the webconsole
penalties show privileged client's level
don't have commands to chat history
This commit is contained in:
RaidMax
2018-02-23 23:56:03 -06:00
parent 9ee39b5260
commit 442569b339
15 changed files with 92 additions and 53 deletions

View File

@ -44,6 +44,8 @@ namespace WebfrontCore.Controllers
clientDto.Meta.AddRange(await IW4MAdmin.ApplicationManager.GetInstance().GetPenaltyService().ReadGetClientPenaltiesAsync(client.ClientId, false));
clientDto.Meta = clientDto.Meta.OrderByDescending(m => m.When).ToList();
ViewBag.Title = clientDto.Name;
return View("Profile/Index", clientDto);
}

View File

@ -28,6 +28,7 @@ namespace WebfrontCore.Controllers
var requestIPAddress = Request.HttpContext.Connection.RemoteIpAddress;
var intIP = requestIPAddress.ToString().ConvertToIP();
#if !DEBUG
var origin = (await IW4MAdmin.ApplicationManager.GetInstance().GetClientService().GetClientByIP(intIP))
.OrderByDescending(c => c.Level)
.FirstOrDefault()?.AsPlayer() ?? new Player()
@ -36,6 +37,9 @@ namespace WebfrontCore.Controllers
Level = Player.Permission.User,
IPAddress = intIP
};
#else
var origin = (await IW4MAdmin.ApplicationManager.GetInstance().GetClientService().GetUnique(0)).AsPlayer();
#endif
var server = IW4MAdmin.ApplicationManager.GetInstance().Servers.First(s => s.GetHashCode() == serverId);
origin.CurrentServer = server;