mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-13 00:28:10 -05:00
use correct EFClient return time for ScriptPluginExtensions and provide IPAddress on game interface data
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Application.Extensions;
|
||||
@ -29,7 +29,7 @@ public static class ScriptPluginExtensions
|
||||
}
|
||||
|
||||
public static EFClient GetClientByNumber(this IGameServer server, int clientNumber) =>
|
||||
server.ConnectedClients.FirstOrDefault(client => client.ClientNumber == clientNumber);
|
||||
server.ConnectedClients.FirstOrDefault(client => client.ClientNumber >= 0 && client.ClientNumber == clientNumber);
|
||||
|
||||
public static EFClient GetClientByGuid(this IGameServer server, string clientGuid) =>
|
||||
server.ConnectedClients.FirstOrDefault(client => client?.GuidString == clientGuid?.Trim().ToLower());
|
||||
|
Reference in New Issue
Block a user