1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

update stats

change server id
fIx change log server complaining when empty read
This commit is contained in:
RaidMax
2018-11-27 18:31:48 -06:00
parent 2ca7083011
commit 08d497153a
44 changed files with 966 additions and 157 deletions

View File

@ -1,10 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using SharedLibraryCore;
using SharedLibraryCore.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebfrontCore.Controllers
{
@ -12,16 +9,19 @@ namespace WebfrontCore.Controllers
{
[HttpGet]
[ResponseCache(NoStore = true, Duration = 0)]
public IActionResult ClientActivity(int id)
public IActionResult ClientActivity(long id)
{
var s = Manager.GetServers().FirstOrDefault(s2 => s2.GetHashCode() == id);
var s = Manager.GetServers().FirstOrDefault(s2 => s2.EndPoint == id);
if (s == null)
{
return View("Error", "Invalid server!");
}
var serverInfo = new ServerInfo()
{
Name = s.Hostname,
ID = s.GetHashCode(),
ID = s.EndPoint,
Port = s.GetPort(),
Map = s.CurrentMap.Alias,
ClientCount = s.ClientNum,