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

increased max events for event api to 100

added GameInfo to EventInfo class
make sure score gets updated properly after authentication
This commit is contained in:
RaidMax
2018-07-30 19:31:00 -05:00
parent 3684ed2032
commit def22f20fb
7 changed files with 6421 additions and 18 deletions

View File

@ -10,7 +10,7 @@ namespace IW4MAdmin.Application.API
{
class EventApi : IEventApi
{
private const int MaxEvents = 32;
private const int MaxEvents = 100;
private Queue<EventInfo> RecentEvents = new Queue<EventInfo>();
public IEnumerable<EventInfo> GetEvents(bool shouldConsume)
@ -35,6 +35,11 @@ namespace IW4MAdmin.Application.API
var apiEvent = new EventInfo()
{
ExtraInfo = E.Extra?.ToString() ?? E.Data,
GameInfo = new EntityInfo()
{
Name = E.Owner.GameName.ToString(),
Id = (int)E.Owner.GameName
},
OwnerEntity = new EntityInfo()
{
Name = E.Owner.Hostname,