Example #1
0
        private static void BattlEyeConnected(BattlEyeConnectEventArgs args)
        {
            //if (args.ConnectionResult == BattlEyeConnectionResult.Success) { /* Connected successfully */ }
            //if (args.ConnectionResult == BattlEyeConnectionResult.InvalidLogin) { /* Connection failed, invalid login details */ }
            //if (args.ConnectionResult == BattlEyeConnectionResult.ConnectionFailed) { /* Connection failed, host unreachable */ }

            Console.WriteLine(args.Message);
        }
Example #2
0
 private void BattlEyeConnected(BattlEyeConnectEventArgs args)
 {
     if (args.ConnectionResult == BattlEyeConnectionResult.Success)
     {
         AppConsole.Log(String.Format("Connected to {0}:{1}", _settings.Address, _settings.Port));
     }
     else
     {
         AppConsole.Log(String.Format("Connection to {0}:{1} failed: {2}", _settings.Address, _settings.Port, args.Message), ConsoleColor.Red);
         if (_connected)
         {
             Thread.Sleep(2000);
             Environment.Exit(0);
         }
     }
 }
Example #3
0
 void battlEyeClient_BattlEyeConnected(BattlEyeConnectEventArgs args)
 {
     if (_battlEyeClient != null && _battlEyeClient.Connected)
         OnConnectHandler();
 }
Example #4
0
 private static void Connect(BattlEyeConnectEventArgs args)
 {
     Console.WriteLine(args.Message);
 }
Example #5
0
 private void HandleConnect(BattlEyeConnectEventArgs args)
 {
     switch (args.ConnectionResult)
     {
         case BattlEyeConnectionResult.Success:
             if (Settings.Default.showConnectMessages && _form != null)
             {
                 if (!_reconnecting && _form.connect.Enabled == true)
                     _form.Log("Connected!", LogType.Console, false);
                 else
                     _form.Log("Reconnected!", LogType.Console, false);
             }
             _error = false;
             break;
         case BattlEyeConnectionResult.InvalidLogin:
             if (_form != null) _form.Log("Login invalid!", LogType.Console, false);
             _error = true;
             break;
         case BattlEyeConnectionResult.ConnectionFailed:
             if (_form.connect.Enabled)
                 if (_form != null) _form.Log("Failed to connect. Please make sure that you properly set a password in beserver.cfg and the server is running.", LogType.Console, false);
             _error = true;
             break;
         default:
             if (_form != null) _form.Log("Unknown error.", LogType.Console, false);
             _error = true;
             break;
     }
 }
Example #6
0
 void BattlEyeConnected(BattlEyeConnectEventArgs args)
 {
     if (OnBeConnectedEvent != null)
     {
         OnBeConnectedEvent();
     }
 }
Example #7
0
 private void BattlEyeConnected(BattlEyeConnectEventArgs args)
 {
     switch (args.ConnectionResult)
     {
         case BattlEyeConnectionResult.Success:
             connected = true;
             if (reconnecting)
             {
                 LogDebug("RCON Reconnected");
                 reconnecting = false;
             }
             else
             {
                 LogDebug("RCON Connected");
             }
             reconnecting = false;
             return;
         case BattlEyeConnectionResult.ConnectionFailed:
             connected = false;
             LogDebug("RCON Failed to connect, please check server is running and beserver.cfg password is correct");
             return;
         case BattlEyeConnectionResult.InvalidLogin:
             connected = false;
             LogDebug("RCON Login is invalid");
             return;
         default:
             connected = false;
             LogDebug("RCON Unknown error");
             return;
     }
 }
Example #8
0
        private void _beClient_BattlEyeConnected(BattlEyeConnectEventArgs args)
        {
            if (args.ConnectionResult != BattlEyeConnectionResult.Success)
            {
                // Couldn't connect somehow
                Logging.WriteServerLine("Could not connect to server", serverID.ToString());
                Connect();
                return;
            }

            // Start modules
            //_donorCommands = new DonorCommands(this);
            //_votekickModule = new VotekickModule(this);
            //_donationGoalReminder = new DonationGoalReminder(this);

            _modules = new List<Module>();
            _modules.Add(new UserStats(this));

            Logging.WriteServerLine("Connected to server!", serverID.ToString());

            // Fetch player list
            _beClient.SendCommand(BattlEyeCommand.Players);
        }