Пример #1
0
 public void connectClient()
 {
     this.b = new BattlEyeClient(this.loginCredentials);
     this.b.MessageReceivedEvent += new BattlEyeMessageEventHandler(this.HandleMessage);
     this.b.DisconnectEvent      += new BattlEyeDisconnectEventHandler(this.HandleDisconnect);
     this.b.ReconnectOnPacketLoss(true);
     this.b.Connect();
 }
Пример #2
0
 public void connectClient()
 {
     this.b = new BattlEyeClient(this.loginCredentials);
     this.b.MessageReceivedEvent += new BattlEyeMessageEventHandler(this.HandleMessage);
     this.b.DisconnectEvent += new BattlEyeDisconnectEventHandler(this.HandleDisconnect);
     this.b.ReconnectOnPacketLoss(true);
     this.b.Connect();
 }
Пример #3
0
 private void connectClient()
 {
     this.write("Starting Connection to Client...", ConsoleColor.DarkMagenta);
     do
     {
         this.b = new BattlEyeClient(this.loginCredentials);
         this.b.MessageReceivedEvent += new BattlEyeMessageEventHandler(this.HandleMessage);
         this.b.DisconnectEvent      += new BattlEyeDisconnectEventHandler(this.HandleDisconnect);
         this.b.ReconnectOnPacketLoss(true);
         this.b.Connect();
         Thread.Sleep(3000);
     }while (!this.b.IsConnected());
 }
Пример #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Initializing DayZ Whitelister Pro");

            // init BattlEye
            b.MessageReceivedEvent += DumpMessage;
            b.DisconnectEvent      += Disconnected;
            b.ReconnectOnPacketLoss(true);
            b.Connect();

            try
            {
                if (b.IsConnected() == false)
                {
                    Console.WriteLine("No connection To server");
                    Console.WriteLine("Exiting");
                    b = null;
                    return;
                }

                Console.WriteLine("Connected...");
                Console.WriteLine("Waiting for clients");

                // main body of work
                do
                {
                    // capture logs
                    // Wait 1 second to conserve CPU cycles.  Thanks ryan!
                    Thread.Sleep(1000);
                } while (b.IsConnected() == true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                b = null;
            }
        }
Пример #5
0
 private void connectClient()
 {
     this.write("Starting Connection to Client...", ConsoleColor.DarkMagenta);
     do
     {
         this.b = new BattlEyeClient(this.loginCredentials);
         this.b.MessageReceivedEvent += new BattlEyeMessageEventHandler(this.HandleMessage);
         this.b.DisconnectEvent += new BattlEyeDisconnectEventHandler(this.HandleDisconnect);
         this.b.ReconnectOnPacketLoss(true);
         this.b.Connect();
         Thread.Sleep(3000);
     }
     while (!this.b.IsConnected());
 }
Пример #6
0
        static void Main(string[] args)
        {
            // init BattlEye
            b.MessageReceivedEvent += DumpMessage;
            b.DisconnectEvent += Disconnected;
            b.ReconnectOnPacketLoss(true);
            b.Connect();

            try
            {
                if (b.IsConnected() == false)
                {
                    Console.WriteLine("No connection To server");
                    Console.WriteLine("Exiting");
                    b = null;
                    return;
                }

                // main body of work
                do
                {
                    // capture logs

                } while (b.IsConnected() == true);

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                b = null;
            }
        }
Пример #7
0
        static void Main(string[] args)
        {
            Console.WriteLine("Initializing DayZ Whitelister Pro");

            // init BattlEye
            b.MessageReceivedEvent += DumpMessage;
            b.DisconnectEvent += Disconnected;
            b.ReconnectOnPacketLoss(true);
            b.Connect();

            try
            {
                if (b.IsConnected() == false)
                {
                    Console.WriteLine("No connection To server");
                    Console.WriteLine("Exiting");
                    b = null;
                    return;
                }

                Console.WriteLine("Connected...");
                Console.WriteLine("Waiting for clients");

                // main body of work
                do
                {
                    // capture logs
                    // Wait 1 second to conserve CPU cycles.  Thanks ryan!
                    Thread.Sleep(1000);

                } while (b.IsConnected() == true);

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                b = null;
            }
        }
Пример #8
0
        private void mnuConnect_Click(object sender, EventArgs e)
        {
            if (isConnected == false)
            {
                BattlEyeLoginCredentials logcred = new BattlEyeLoginCredentials { Host = ip, Password = password, Port = Convert.ToInt32(port) };
                b = new BattlEyeClient(logcred);
                keepAliveTimer = new Timer();
                keepAliveTimer.Tick += new EventHandler(sendKeepAlivePacket);
                keepAliveTimer.Interval = 30000; // in miliseconds

                rtbDisplay.AppendText("\n Connecting...\n");

                // make the connection
                b.MessageReceivedEvent += DumpMessage;
                b.DisconnectEvent += Disconnected;
                b.ReconnectOnPacketLoss(true);
                b.Connect();

                if (b.IsConnected() == true)
                {
                    isConnected = true;
                    mnuConnect.Enabled = false;
                    b.SendCommandPacket("");
                    keepAliveTimer.Start();

                    if (showStartupMsg == true)
                    {
                        b.SendCommandPacket(EBattlEyeCommand.Say, "-1 Whitelister started");
                    }
                }
            }
        }