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

add game to client

This commit is contained in:
RaidMax
2022-04-22 16:03:34 -05:00
parent 001a7a4601
commit 19c3ab8a3d
13 changed files with 5061 additions and 4 deletions

View File

@ -431,6 +431,7 @@ namespace IW4MAdmin
Clients[E.Origin.ClientNumber] = E.Origin;
try
{
E.Origin.GameName = (Reference.Game?)GameName;
E.Origin = await OnClientConnected(E.Origin);
E.Target = E.Origin;
}
@ -952,6 +953,8 @@ namespace IW4MAdmin
!string.IsNullOrEmpty(client.Name) && (client.Ping != 999 || client.IsBot)))
{
client.CurrentServer = this;
client.GameName = (Reference.Game?)GameName;
var e = new GameEvent
{
Type = GameEvent.EventType.PreConnect,
@ -959,7 +962,7 @@ namespace IW4MAdmin
Owner = this,
IsBlocking = true,
Extra = client.GetAdditionalProperty<string>("BotGuid"),
Source = GameEvent.EventSource.Status
Source = GameEvent.EventSource.Status,
};
Manager.AddEvent(e);