Example #1
0
        private static void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args)
        {
            //if (args.DisconnectionType == BattlEyeDisconnectionType.ConnectionLost) { /* Connection lost (timeout), if ReconnectOnPacketLoss is set to true it will reconnect */ }
            //if (args.DisconnectionType == BattlEyeDisconnectionType.SocketException) { /* Something went terribly wrong... */ }
            //if (args.DisconnectionType == BattlEyeDisconnectionType.Manual) { /* Disconnected by implementing application, that would be you */ }

            Console.WriteLine(args.Message);
        }
Example #2
0
 private void OnBattlEyeDisconneted(BattlEyeDisconnectEventArgs args)
 {
     // Save player stats on disconnect
     lock (_server.PlayerList)
     {
         foreach (PlayerInfo player in _server.PlayerList.Values)
         {
             OnPlayerDisconnect(player);
         }
     }
 }
Example #3
0
 private void HandleDisconnect(BattlEyeDisconnectEventArgs args)
 {
     switch (args.DisconnectionType)
     {
     case EBattlEyeDisconnectionType.Manual:
         break;
     case EBattlEyeDisconnectionType.ConnectionLost:
         Console.WriteLine("Connection lost. Trying reconnect...");
         break;
     case EBattlEyeDisconnectionType.SocketException:
         Console.WriteLine("Invalid host");
         break;
     case EBattlEyeDisconnectionType.LoginFailed:
         Console.WriteLine("Login invalid!");
         break;
     default:
         Console.WriteLine("Unknown error");
         break;
     }
 }
Example #4
0
 private void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args)
 {
     AppConsole.Log("BE Disconnected", ConsoleColor.Yellow);
     Thread.Sleep(2000);
     Environment.Exit(0);
 }
Example #5
0
 private void HandleDisconnect(BattlEyeDisconnectEventArgs args)
 {
     switch (args.DisconnectionType)
     {
     case EBattlEyeDisconnectionType.Manual:
         break;
     case EBattlEyeDisconnectionType.ConnectionLost:
         Console.WriteLine("Connection lost.");
         break;
     case EBattlEyeDisconnectionType.SocketException:
         Console.WriteLine("Invalid host");
         break;
     case EBattlEyeDisconnectionType.LoginFailed:
         Console.WriteLine("Login invalid!");
         break;
     case EBattlEyeDisconnectionType.ConnectionFailed:
         this.write("Could not connect to Battleye. (Is Battleye enabled?)", ConsoleColor.DarkRed);
         break;
     default:
         Console.WriteLine("Unknown Battleye error!");
         break;
     }
 }
Example #6
0
 private static void Disconnected(BattlEyeDisconnectEventArgs args)
 {
     Console.WriteLine(args.Message);
 }
Example #7
0
        private void HandleDisconnect(BattlEyeDisconnectEventArgs args)
        {
            switch (args.DisconnectionType)
            {
                case BattlEyeDisconnectionType.ConnectionLost:
                    if (!_reconnecting)
                    {
                        if (_form != null) _form.Log("Connection to server was lost. Attempting to reconnect...", LogType.Console, false);
                        this.Reconnect();
                    }
                    break;
                case BattlEyeDisconnectionType.Manual:
                    // Handle manual reconnect
                    break;

                case BattlEyeDisconnectionType.SocketException:
                    if (_form.connect.Enabled)
                    {
                        if (_form != null) _form.Log("Host invalid!", LogType.Console, false);
                    }
                    else
                    {
                        if (!_reconnecting)
                        {
                            if (_form != null) _form.Log("It appears that the server went down. Attempting to reconnect...", LogType.Console, false);
                            this.Reconnect();
                        }
                    }
                    break;
                default:
                    if (_form != null) _form.Log("Unknown error.", LogType.Console, false);
                    break;
            }
        }
Example #8
0
 void _battlEyeClient_BattlEyeDisconnected(BattlEyeDisconnectEventArgs args)
 {
     OnDisconnectHandler();
 }
Example #9
0
 void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args)
 {
     if (OnBeDisconnectedEvent != null)
     {
         OnBeDisconnectedEvent();
     }
 }
Example #10
0
        private void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args)
        {
            connected = false;

            if (args.DisconnectionType.HasValue)
            {
                switch (args.DisconnectionType)
                {
                    case BattlEyeDisconnectionType.Manual:
                        LogDebug("RCON Disconnected");
                        return;
                    case BattlEyeDisconnectionType.ConnectionLost:
                        if (!reconnecting)
                        {
                            LogDebug("RCON Connection lost, attempting to reconnect");
                            BEReconnect();
                            return;
                        }
                        return;
                    case BattlEyeDisconnectionType.SocketException:
                        if (cbConnect.Enabled)
                        {
                            LogDebug("RCON Host invalid");
                            return;
                        }
                        else
                        {
                            if (!reconnecting)
                            {
                                LogDebug("RCON Server appears down, attempting to reconnect");
                                BEReconnect();
                                return;
                            }
                            return;
                        }
                }
            }
            else
            {
                LogDebug("RCON Unknown error");
            }
        }
Example #11
0
 /* DISCONNECT EVENT */
 private void Disconnected(BattlEyeDisconnectEventArgs args)
 {
     mnuConnect.Enabled = false;
     doDisconnect(args.Message);
 }
Example #12
0
 private void Disconnected(BattlEyeDisconnectEventArgs args)
 {
     this.Log.Info(args.Message);
 }
Example #13
0
        private void ServerDisconnectEvent(BattlEyeDisconnectEventArgs args)
        {
            //if (args.DisconnectionType == BattlEyeDisconnectionType.ConnectionLost)
            //    return;

            Logging.WriteServerLine("Disconnected from server! (" + args.DisconnectionType + ")", serverID.ToString());
            Logging.WriteServerLine("Reconnecting...", serverID.ToString());

            Stop();
            //Thread.Sleep(5000); // sleep 5 seconds
            Connect();
        }