1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

implement profile interaction registration through plugins (mute and vpn detection implementation)

This commit is contained in:
RaidMax
2022-09-08 15:03:38 -05:00
parent 7ad4615548
commit 8d8a8d869a
26 changed files with 452 additions and 26 deletions

View File

@ -25,14 +25,16 @@ namespace WebfrontCore.Controllers
private readonly StatsConfiguration _config;
private readonly IGeoLocationService _geoLocationService;
private readonly ClientService _clientService;
private readonly IInteractionRegistration _interactionRegistration;
public ClientController(IManager manager, IMetaServiceV2 metaService, StatsConfiguration config,
IGeoLocationService geoLocationService, ClientService clientService) : base(manager)
IGeoLocationService geoLocationService, ClientService clientService, IInteractionRegistration interactionRegistration) : base(manager)
{
_metaService = metaService;
_config = config;
_geoLocationService = geoLocationService;
_clientService = clientService;
_interactionRegistration = interactionRegistration;
}
[Obsolete]
@ -75,6 +77,8 @@ namespace WebfrontCore.Controllers
note.OriginEntityName = await _clientService.GetClientNameById(note.OriginEntityId);
}
var interactions = await _interactionRegistration.GetInteractions(id, client.GameName, token);
// even though we haven't set their level to "banned" yet
// (ie they haven't reconnected with the infringing player identifier)
// we want to show them as banned as to not confuse people.
@ -137,7 +141,8 @@ namespace WebfrontCore.Controllers
ingameClient.CurrentServer.Port),
CurrentServerName = ingameClient?.CurrentServer?.Hostname,
GeoLocationInfo = await _geoLocationService.Locate(client.IPAddressString),
NoteMeta = string.IsNullOrWhiteSpace(note?.Note) ? null: note
NoteMeta = string.IsNullOrWhiteSpace(note?.Note) ? null: note,
Interactions = interactions.ToList()
};
var meta = await _metaService.GetRuntimeMeta<InformationResponse>(new ClientPaginationRequest