예제 #1
0
 private void CloseConnection()
 {
     if (this.persistance != null)
     {
         this.persistance.Dispose();
         this.persistance = null;
     }
     EACServer.DoShutdown();
     Network.Net.sv.callbackHandler = null;
     using (TimeWarning timeWarning = TimeWarning.New("sv.Stop", 0.1f))
     {
         Network.Net.sv.Stop("Shutting Down");
     }
     using (timeWarning = TimeWarning.New("RCon.Shutdown", 0.1f))
     {
         RCon.Shutdown();
     }
     using (timeWarning = TimeWarning.New("Steamworks.GameServer.Shutdown", 0.1f))
     {
         if (SteamServer.IsValid)
         {
             UnityEngine.Debug.Log("Steamworks Shutting Down");
             SteamServer.Shutdown();
             UnityEngine.Debug.Log("Okay");
         }
     }
 }
예제 #2
0
 private void CloseConnection()
 {
     if (this.persistance != null)
     {
         this.persistance.Dispose();
         this.persistance = (UserPersistance)null;
     }
     EACServer.DoShutdown();
     ((Network.Server)Network.Net.sv).callbackHandler = null;
     using (TimeWarning.New("sv.Stop", 0.1f))
         ((Network.Server)Network.Net.sv).Stop("Shutting Down");
     using (TimeWarning.New("RCon.Shutdown", 0.1f))
         RCon.Shutdown();
     using (TimeWarning.New("Steamworks.GameServer.Shutdown", 0.1f))
     {
         if (Global.get_SteamServer() == null)
         {
             return;
         }
         Debug.Log((object)"Steamworks Shutting Down");
         ((BaseSteamworks)Global.get_SteamServer()).Dispose();
         Global.set_SteamServer((Facepunch.Steamworks.Server)null);
         Debug.Log((object)"Okay");
     }
 }
예제 #3
0
        public void IN_OnNetworkMessage(Message packet)
        {
            switch (packet.type)
            {
            case Message.Type.Approved:
                OnApproved(packet);
                break;

            case Message.Type.EAC:
                EACServer.OnMessageReceived(packet);
                SendPacket(BaseServer, packet);
                break;

            case Message.Type.DisconnectReason:
                SendPacket(BaseServer, packet);
                if (BaseServer != null && BaseServer.connections.Count > 0)
                {
                    packet.read.Position = 1L;
                    string reasone = packet.read.String();
                    BaseServer?.Kick(BaseServer.connections[0], reasone);
                    ConsoleSystem.LogWarning("[VirtualServer]: От игрового сервера получена причина дисконнекта: " + reasone);
                }
                break;

            case Message.Type.Entities:
                packet.read.UInt32();
                using (Entity entity = Entity.Deserialize(packet.read))
                {
                    if (EntityManager.OnEntity(entity) == false)
                    {
                        if (BaseServer.write.Start())
                        {
                            BaseServer.write.PacketID(Message.Type.Entities);
                            BaseServer.write.UInt32(TakeEntityNUM);
                            entity.WriteToStream(BaseServer.write);
                            BaseServer.write.Send(new SendInfo(BaseServer.connections[0]));
                        }
                    }
                }
                break;

            case Message.Type.EntityDestroy:
                EntityManager.OnEntityDestroy(packet);
                SendPacket(BaseServer, packet);
                break;

            case Message.Type.EntityPosition:
                EntityManager.OnEntityPosition(packet);
                SendPacket(BaseServer, packet);
                break;

            default:
                if (NetworkManager.Instance.IN_NetworkMessage(packet) == false)
                {
                    SendPacket(BaseServer, packet);
                }
                break;
            }
        }
예제 #4
0
 public static void OnStartLoading(Connection connection)
 {
     if (EACServer.easyAntiCheat != null)
     {
         EasyAntiCheat.Server.Hydra.Client client = EACServer.GetClient(connection);
         EACServer.easyAntiCheat.SetClientNetworkState(client, false);
     }
 }
예제 #5
0
 private static void HandleClientUpdate(ClientStatusUpdate <EasyAntiCheat.Server.Hydra.Client> clientStatus)
 {
     using (TimeWarning.New("AntiCheatKickPlayer", 10L))
     {
         EasyAntiCheat.Server.Hydra.Client client = clientStatus.get_Client();
         Connection connection = EACServer.GetConnection(client);
         if (connection == null)
         {
             Debug.LogError((object)("EAC status update for invalid client: " + (object)((EasyAntiCheat.Server.Hydra.Client) ref client).get_ClientID()));
         }
         else
         {
             if (EACServer.ShouldIgnore(connection))
             {
                 return;
             }
             if (clientStatus.get_RequiresKick())
             {
                 string message = clientStatus.get_Message();
                 if (string.IsNullOrEmpty(message))
                 {
                     message = clientStatus.get_Status().ToString();
                 }
                 Debug.Log((object)("[EAC] Kicking " + (object)(ulong)connection.userid + " (" + message + ")"));
                 connection.authStatus = (__Null)"eac";
                 ((Network.Server)Net.sv).Kick(connection, "EAC: " + message);
                 DateTime?nullable = new DateTime?();
                 if (clientStatus.IsBanned(ref nullable))
                 {
                     connection.authStatus = (__Null)"eacbanned";
                     Interface.CallHook("OnPlayerBanned", (object)connection, (object)connection.authStatus);
                     ConsoleNetwork.BroadcastToAllClients("chat.add", (object)0, (object)("<color=#fff>SERVER</color> Kicking " + (string)connection.username + " (banned by anticheat)"));
                     if (!nullable.HasValue)
                     {
                         Entity.DeleteBy((ulong)connection.userid);
                     }
                 }
                 EACServer.easyAntiCheat.UnregisterClient(client);
                 EACServer.client2connection.Remove(client);
                 EACServer.connection2client.Remove(connection);
                 EACServer.connection2status.Remove(connection);
             }
             else if (clientStatus.get_Status() == 2)
             {
                 EACServer.OnAuthenticatedLocal(connection);
                 EACServer.easyAntiCheat.SetClientNetworkState(client, false);
             }
             else
             {
                 if (clientStatus.get_Status() != 5)
                 {
                     return;
                 }
                 EACServer.OnAuthenticatedRemote(connection);
             }
         }
     }
 }
예제 #6
0
 public static void OnFinishLoading(Connection connection)
 {
     if (EACServer.easyAntiCheat == null)
     {
         return;
     }
     EasyAntiCheat.Server.Hydra.Client client = EACServer.GetClient(connection);
     EACServer.easyAntiCheat.SetClientNetworkState(client, true);
 }
예제 #7
0
 public static void Decrypt(
     Connection connection,
     MemoryStream src,
     int srcOffset,
     MemoryStream dst,
     int dstOffset)
 {
     EACServer.easyAntiCheat.get_NetProtect().UnprotectMessage(EACServer.GetClient(connection), src, (long)srcOffset, dst, (long)dstOffset);
 }
예제 #8
0
 protected override void EncryptionHandler(Connection connection, MemoryStream src, int srcOffset, MemoryStream dst, int dstOffset)
 {
     if (connection.encryptionLevel <= 1)
     {
         Craptography.XOR(2177, src, srcOffset, dst, dstOffset);
         return;
     }
     EACServer.Encrypt(connection, src, srcOffset, dst, dstOffset);
 }
예제 #9
0
 public static void OnLeaveGame(Connection connection)
 {
     if (EACServer.easyAntiCheat != null)
     {
         EasyAntiCheat.Server.Hydra.Client client = EACServer.GetClient(connection);
         EACServer.easyAntiCheat.UnregisterClient(client);
         EACServer.client2connection.Remove(client);
         EACServer.connection2client.Remove(connection);
         EACServer.connection2status.Remove(connection);
     }
 }
예제 #10
0
 // Methods
 protected override void DecryptionHandler(Connection connection, MemoryStream src, int srcOffset, MemoryStream dst, int dstOffset)
 {
     if (connection.encryptionLevel <= 1)
     {
         Cryptography.XOR(2031, src, srcOffset, dst, dstOffset);
     }
     else
     {
         EACServer.Decrypt(connection, src, srcOffset, dst, dstOffset);
     }
 }
예제 #11
0
 public static IEnumerator Run(Connection connection)
 {
     if (connection.active != null && connection.rejected == null)
     {
         connection.authStatus = (__Null)string.Empty;
         EACServer.OnJoinGame(connection);
         while (connection.active != null && connection.rejected == null && (string)connection.authStatus == string.Empty)
         {
             yield return((object)null);
         }
     }
 }
예제 #12
0
 public static IEnumerator Run(Connection connection)
 {
     if (connection.active && !connection.rejected)
     {
         connection.authStatus = string.Empty;
         EACServer.OnJoinGame(connection);
         while (connection.active && !connection.rejected && connection.authStatus == string.Empty)
         {
             yield return(null);
         }
     }
 }
예제 #13
0
        private bool RPC_StartLoading(ERPCNetworkType type, Message message)
        {
            ConsoleSystem.Log("StartLoading");
            EACServer.OnStartLoading(VirtualServer.BaseClient.Connection);
            EACServer.OnStartLoading(VirtualServer.BaseServer.connections[0]);
            BaseNetworkable.DestroyAll();

            ListNetworkables.Add(this.UID, this);
            ListPlayers.Add(this);

            return(false);
        }
예제 #14
0
 public static void OnMessageReceived(Message message)
 {
     if (!EACServer.connection2client.ContainsKey((Connection)message.connection))
     {
         Debug.LogError((object)("EAC network packet from invalid connection: " + (object)(ulong)((Connection)message.connection).userid));
     }
     else
     {
         EasyAntiCheat.Server.Hydra.Client client = EACServer.GetClient((Connection)message.connection);
         MemoryStream memoryStream = message.get_read().MemoryStreamWithSize();
         EACServer.easyAntiCheat.PushNetworkMessage(client, memoryStream.GetBuffer(), (int)memoryStream.Length);
     }
 }
예제 #15
0
 private static void HandleClientUpdate(ClientStatusUpdate <EasyAntiCheat.Server.Hydra.Client> clientStatus)
 {
     using (TimeWarning timeWarning = TimeWarning.New("AntiCheatKickPlayer", (long)10))
     {
         EasyAntiCheat.Server.Hydra.Client client = clientStatus.Client;
         Connection connection = EACServer.GetConnection(client);
         if (connection == null)
         {
             Debug.LogError(string.Concat("EAC status update for invalid client: ", client.ClientID));
         }
         else if (!EACServer.ShouldIgnore(connection))
         {
             if (clientStatus.RequiresKick)
             {
                 string message = clientStatus.Message;
                 if (string.IsNullOrEmpty(message))
                 {
                     message = clientStatus.Status.ToString();
                 }
                 Debug.Log(string.Concat(new object[] { "[EAC] Kicking ", connection.userid, " (", message, ")" }));
                 connection.authStatus = "eac";
                 Network.Net.sv.Kick(connection, string.Concat("EAC: ", message));
                 DateTime?nullable = null;
                 if (clientStatus.IsBanned(out nullable))
                 {
                     connection.authStatus = "eacbanned";
                     Interface.CallHook("OnPlayerBanned", connection, connection.authStatus);
                     ConsoleNetwork.BroadcastToAllClients("chat.add", new object[] { 0, string.Concat("<color=#fff>SERVER</color> Kicking ", connection.username, " (banned by anticheat)") });
                     if (!nullable.HasValue)
                     {
                         Entity.DeleteBy(connection.userid);
                     }
                 }
                 EACServer.easyAntiCheat.UnregisterClient(client);
                 EACServer.client2connection.Remove(client);
                 EACServer.connection2client.Remove(connection);
                 EACServer.connection2status.Remove(connection);
             }
             else if (clientStatus.Status == ClientStatus.ClientAuthenticatedLocal)
             {
                 EACServer.OnAuthenticatedLocal(connection);
                 EACServer.easyAntiCheat.SetClientNetworkState(client, false);
             }
             else if (clientStatus.Status == ClientStatus.ClientAuthenticatedRemote)
             {
                 EACServer.OnAuthenticatedRemote(connection);
             }
         }
     }
 }
예제 #16
0
    public void OnDisconnected(string strReason, Network.Connection connection)
    {
        this.connectionQueue.RemoveConnection(connection);
        ConnectionAuth.OnDisconnect(connection);
        SteamServer.EndSession(connection.userid);
        EACServer.OnLeaveGame(connection);
        BasePlayer basePlayer = connection.player as BasePlayer;

        if (basePlayer)
        {
            Interface.CallHook("OnPlayerDisconnected", basePlayer, strReason);
            basePlayer.OnDisconnected();
        }
    }
예제 #17
0
 private void InitializationEAC()
 {
     try
     {
         ConsoleSystem.Log("[VirtualServer]: ParseEncryptionHash запускается...");
         EACServer.DoStartup();
         Timer.SetInterval(EACServer.DoUpdate, 1f);
         ConsoleSystem.Log("[VirtualServer]: ParseEncryptionHash успешно запущен!");
     }
     catch (Exception ex)
     {
         ConsoleSystem.LogError("[VirtualServer]: Исключение в InitializationEAC(): " + ex.Message);
     }
 }
예제 #18
0
    public void OnDisconnected(string strReason, Network.Connection connection)
    {
        this.connectionQueue.RemoveConnection(connection);
        ConnectionAuth.OnDisconnect(connection);
        Global.get_SteamServer().get_Auth().EndSession((ulong)connection.userid);
        EACServer.OnLeaveGame(connection);
        BasePlayer player = connection.player as BasePlayer;

        if (!Object.op_Implicit((Object)player))
        {
            return;
        }
        Interface.CallHook("OnPlayerDisconnected", (object)player, (object)strReason);
        player.OnDisconnected();
    }
예제 #19
0
    public static void OnMessageReceived(Message message)
    {
        byte[] numArray;
        int    num;

        if (!EACServer.connection2client.ContainsKey(message.connection))
        {
            Debug.LogError(string.Concat("EAC network packet from invalid connection: ", message.connection.userid));
            return;
        }
        EasyAntiCheat.Server.Hydra.Client client = EACServer.GetClient(message.connection);
        if (!message.read.TemporaryBytesWithSize(out numArray, out num))
        {
            return;
        }
        EACServer.easyAntiCheat.PushNetworkMessage(client, numArray, num);
    }
예제 #20
0
    private static void SendToClient(EasyAntiCheat.Server.Hydra.Client client, byte[] message, int messageLength)
    {
        Connection connection = EACServer.GetConnection(client);

        if (connection == null)
        {
            Debug.LogError(string.Concat("EAC network packet for invalid client: ", client.ClientID));
            return;
        }
        if (Network.Net.sv.write.Start())
        {
            Network.Net.sv.write.PacketID(Message.Type.EAC);
            Network.Net.sv.write.UInt32((uint)messageLength);
            Network.Net.sv.write.Write(message, 0, messageLength);
            Network.Net.sv.write.Send(new SendInfo(connection));
        }
    }
예제 #21
0
    public static void DoUpdate()
    {
        EasyAntiCheat.Server.Hydra.Client client;
        byte[] numArray;
        int    num;

        if (EACServer.easyAntiCheat != null)
        {
            EACServer.easyAntiCheat.HandleClientUpdates();
            if (Network.Net.sv != null && Network.Net.sv.IsConnected())
            {
                while (EACServer.easyAntiCheat.PopNetworkMessage(out client, out numArray, out num))
                {
                    EACServer.SendToClient(client, numArray, num);
                }
            }
        }
    }
예제 #22
0
        public void OUT_OnDisconnected(string reason, Connection conn)
        {
            if (BaseClient?.IsConnected() == true)
            {
                ConsoleSystem.LogWarning("[VirtualServer]: Соеденение с игровым клиентом разорвано: " + reason);
                BaseClient?.Disconnect(reason, false);
                if (BaseClient != null & BaseClient.Connection != null)
                {
                    BaseClient.Connection.decryptIncoming = false;
                    BaseClient.Connection.encryptOutgoing = false;
                }
                NetworkManager.Instance.OnDisconnected();

                ConnectionInformation = null;
                LastEntityNUM         = 0;
            }
            EACServer.OnLeaveGame(conn);
        }
예제 #23
0
        public void OnNewConnection(Connection connection)
        {
            try
            {
                if (BaseServer.connections.Count <= 1)
                {
                    ConsoleSystem.Log($"[VirtualServer]: Есть новое подключение [{BaseServer.connections[0].ipaddress}]");
                    ConsoleSystem.Log($"[VirtualServer]: Подключаемся к игровому серверу [{Settings.TargetServer_IP}:{Settings.TargetServer_Port}]");
                    if (BaseClient.Connect(Settings.TargetServer_IP, Settings.TargetServer_Port))
                    {
                        BaseClient.Connection.ipaddress = "127.0.0.1";
                        BaseClient.Connection.userid    = Settings.Connection1_SteamID;
                        BaseClient.Connection.ownerid   = Settings.Connection1_SteamID;
                        BaseClient.Connection.username  = Settings.Connection1_Username;
                        BaseClient.Connection.authLevel = 1;
                        EACServer.OnJoinGame(BaseClient.Connection);
                        //EACServer.OnStartLoading(BaseClient.Connection);
                        //EACServer.OnFinishLoading(BaseClient.Connection);

                        BaseServer.connections[0].ipaddress = "127.0.0.1";
                        BaseServer.connections[0].userid    = Settings.Connection2_SteamID;
                        BaseServer.connections[0].ownerid   = Settings.Connection2_SteamID;
                        BaseServer.connections[0].username  = Settings.Connection2_Username;
                        BaseServer.connections[0].authLevel = 1;
                        EACServer.OnJoinGame(BaseServer.connections[0]);
                        //EACServer.OnStartLoading(BaseServer.connections[0]);
                        //EACServer.OnFinishLoading(BaseServer.connections[0]);
                        ConsoleSystem.Log("[VirtualServer]: Инициализация подключения успешно завершена!");
                    }
                    else
                    {
                        ConsoleSystem.LogError($"[VirtualServer]: В попытке подключения отказано!");
                    }
                }
                else
                {
                    ConsoleSystem.LogError($"[VirtualServer]: Уже есть одно подключение, больше подключений не может быть!");
                }
            }
            catch (Exception ex)
            {
                ConsoleSystem.LogError("[VirtualServer]: Исключение в OnNewConnection(): " + ex.Message);
            }
        }
예제 #24
0
        public void OUT_OnNetworkMessage(Message packet)
        {
            switch (packet.type)
            {
            case Message.Type.Ready:
                packet.connection.decryptIncoming = true;
                SendPacket(BaseClient, packet);
                BaseClient.Connection.encryptOutgoing = true;
                return;

            case Message.Type.GiveUserInformation:
                ConnectionInformation = UserInformation.ParsePacket(packet);

                if (Settings.UseCustomToken)
                {
                    ConnectionInformation.SteamToken = Settings.CustomToken;
                    if (BaseClient.write.Start())
                    {
                        BaseClient.write.PacketID(Message.Type.GiveUserInformation);
                        ConnectionInformation.Write(BaseClient);
                        BaseClient.Send();
                    }
                }
                else
                {
                    SendPacket(BaseClient, packet);
                }
                break;

            case Message.Type.EAC:
                EACServer.OnMessageReceived(packet);
                SendPacket(BaseClient, packet);
                break;

            default:
                if (NetworkManager.Instance.Out_NetworkMessage(packet) == false)
                {
                    SendPacket(BaseClient, packet);
                }
                break;
            }
        }
예제 #25
0
 public void OpenConnection()
 {
     this.useQueryPort   = (ConVar.Server.queryport <= 0 ? false : ConVar.Server.queryport != ConVar.Server.port);
     Network.Net.sv.ip   = ConVar.Server.ip;
     Network.Net.sv.port = ConVar.Server.port;
     if (!Network.Net.sv.Start())
     {
         UnityEngine.Debug.LogWarning("Couldn't Start Server.");
         return;
     }
     this.StartSteamServer();
     Network.Net.sv.callbackHandler = this;
     Network.Net.sv.cryptography    = new NetworkCryptographyServer();
     EACServer.DoStartup();
     base.InvokeRepeating("EACUpdate", 1f, 1f);
     base.InvokeRepeating("DoTick", 1f, 1f / (float)ConVar.Server.tickrate);
     base.InvokeRepeating("DoHeartbeat", 1f, 1f);
     this.runFrameUpdate = true;
     Interface.CallHook("IOnServerInitialized");
 }
예제 #26
0
    private static void SendToClient(EasyAntiCheat.Server.Hydra.Client client, byte[] message, int messageLength)
    {
        Connection connection = EACServer.GetConnection(client);

        if (connection == null)
        {
            Debug.LogError((object)("EAC network packet for invalid client: " + (object)((EasyAntiCheat.Server.Hydra.Client) ref client).get_ClientID()));
        }
        else
        {
            if (!((Write)((NetworkPeer)Net.sv).write).Start())
            {
                return;
            }
            ((Write)((NetworkPeer)Net.sv).write).PacketID((Message.Type) 22);
            ((Write)((NetworkPeer)Net.sv).write).UInt32((uint)messageLength);
            ((Stream)((NetworkPeer)Net.sv).write).Write(message, 0, messageLength);
            ((Write)((NetworkPeer)Net.sv).write).Send(new SendInfo(connection));
        }
    }
예제 #27
0
    public static void DoUpdate()
    {
        if (EACServer.easyAntiCheat == null)
        {
            return;
        }
        EACServer.easyAntiCheat.HandleClientUpdates();
        if (Net.sv == null || !((Network.Server)Net.sv).IsConnected())
        {
            return;
        }
        EasyAntiCheat.Server.Hydra.Client client;
        byte[] message;
        int    messageLength;

        while (EACServer.easyAntiCheat.PopNetworkMessage(ref client, ref message, ref messageLength))
        {
            EACServer.SendToClient(client, message, messageLength);
        }
    }
예제 #28
0
 public void OpenConnection()
 {
     this.useQueryPort = ConVar.Server.queryport > 0 && ConVar.Server.queryport != ConVar.Server.port;
     ((Network.Server)Network.Net.sv).ip   = (__Null)ConVar.Server.ip;
     ((Network.Server)Network.Net.sv).port = (__Null)ConVar.Server.port;
     if (!((Network.Server)Network.Net.sv).Start())
     {
         Debug.LogWarning((object)"Couldn't Start Server.");
     }
     else
     {
         this.StartSteamServer();
         ((Network.Server)Network.Net.sv).callbackHandler = (__Null)this;
         ((NetworkPeer)Network.Net.sv).cryptography       = (__Null) new NetworkCryptographyServer();
         EACServer.DoStartup();
         ((MonoBehaviour)this).InvokeRepeating("EACUpdate", 1f, 1f);
         ((MonoBehaviour)this).InvokeRepeating("DoTick", 1f, 1f / (float)ConVar.Server.tickrate);
         ((MonoBehaviour)this).InvokeRepeating("DoHeartbeat", 1f, 1f);
         this.runFrameUpdate = true;
         Interface.CallHook("IOnServerInitialized");
     }
 }
예제 #29
0
 public static void OnJoinGame(Connection connection)
 {
     if (EACServer.easyAntiCheat == null)
     {
         EACServer.OnAuthenticatedLocal(connection);
         EACServer.OnAuthenticatedRemote(connection);
     }
     else
     {
         EasyAntiCheat.Server.Hydra.Client client = EACServer.easyAntiCheat.GenerateCompatibilityClient();
         EACServer.easyAntiCheat.RegisterClient(client, connection.userid.ToString(), connection.ipaddress, connection.ownerid.ToString(), connection.username, (connection.authLevel > 0 ? PlayerRegisterFlags.PlayerRegisterFlagAdmin : PlayerRegisterFlags.PlayerRegisterFlagNone));
         EACServer.client2connection.Add(client, connection);
         EACServer.connection2client.Add(connection, client);
         EACServer.connection2status.Add(connection, ClientStatus.ClientDisconnected);
         if (EACServer.ShouldIgnore(connection))
         {
             EACServer.OnAuthenticatedLocal(connection);
             EACServer.OnAuthenticatedRemote(connection);
             return;
         }
     }
 }
예제 #30
0
 public static void OnJoinGame(Connection connection)
 {
     if (EACServer.easyAntiCheat != null)
     {
         EasyAntiCheat.Server.Hydra.Client compatibilityClient = EACServer.easyAntiCheat.GenerateCompatibilityClient();
         // ISSUE: explicit non-virtual call
         // ISSUE: explicit non-virtual call
         EACServer.easyAntiCheat.RegisterClient(compatibilityClient, __nonvirtual(connection.userid.ToString()), (string)connection.ipaddress, __nonvirtual(connection.ownerid.ToString()), (string)connection.username, connection.authLevel > 0 ? (PlayerRegisterFlags)1 : (PlayerRegisterFlags)0);
         EACServer.client2connection.Add(compatibilityClient, connection);
         EACServer.connection2client.Add(connection, compatibilityClient);
         EACServer.connection2status.Add(connection, (ClientStatus)0);
         if (!EACServer.ShouldIgnore(connection))
         {
             return;
         }
         EACServer.OnAuthenticatedLocal(connection);
         EACServer.OnAuthenticatedRemote(connection);
     }
     else
     {
         EACServer.OnAuthenticatedLocal(connection);
         EACServer.OnAuthenticatedRemote(connection);
     }
 }