public VirtualServerWindow(IBattlEyeServerFactory factory)
        {
            InitializeComponent();

            _server = factory.Create(new BattlEyeLoginCredentials()) as VirtualServer;
            if (_server != null)
            {
                _server.CommandRecieved     += _server_CommandRecieved;
                _server.PureCommandRecieved += _server_PureCommandRecieved;
            }
        }
Example #2
0
        private void Init()
        {
            lock (_lock)
            {
                _log.Info($"Init {_credentials.Host}:{_credentials.Port}");

                _battlEyeServer = _battlEyeServerFactory.Create(_credentials);
                _battlEyeServer.BattlEyeConnected       += OnBattlEyeConnected;
                _battlEyeServer.BattlEyeMessageReceived += OnBattlEyeMessageReceived;
                _battlEyeServer.BattlEyeDisconnected    += OnBattlEyeDisconnected;
            }
        }
        private IBattlEyeServer Init(BattlEyeLoginCredentials battlEyeLoginCredentials)
        {
            Log.Info($"Init {battlEyeLoginCredentials.Host}:{battlEyeLoginCredentials.Port}");

            var battlEyeServer = _battlEyeServerFactory.Create(battlEyeLoginCredentials);

            battlEyeServer.BattlEyeConnected       += OnBattlEyeConnected;
            battlEyeServer.BattlEyeMessageReceived += OnBattlEyeMessageReceived;
            battlEyeServer.BattlEyeDisconnected    += OnBattlEyeDisconnected;

            return(battlEyeServer);
        }
Example #4
0
        private void InitClients()
        {
            _log.Info($"{_host}:{_port} Update client - InitClients");
            lock (_lock)
            {
                if (_battlEyeServer != null)
                {
                    ReleaseClient();
                }

                var credentials = new BattlEyeLoginCredentials(IPAddress.Parse(_host), _port, _password);
                _battlEyeServer = _battlEyeServerFactory.Create(credentials);
                _battlEyeServer.BattlEyeConnected       += BattlEyeServerBattlEyeConnected;
                _battlEyeServer.BattlEyeDisconnected    += BattlEyeServerBattlEyeDisconnected;
                _battlEyeServer.BattlEyeMessageReceived += BattlEyeServerBattlEyeMessageReceived;
            }
        }