Exemplo n.º 1
0
 private void CheckEnter(object sender, System.Windows.Forms.KeyPressEventArgs e) // Same as send button
 {
     if (e.KeyChar == (char)13)
     {
         e.Handled = true;
         if (!spamblocked)
         {
             if (rksent == false)
             {
                 try
                 {
                     start(SendBox.Text);
                     SendBox.Text = "";
                 }
                 catch
                 {
                     error("Error starting with room key");
                     throw;
                 }
             }
             else
             {
                 Server.Sender senders = new Server.Sender();
                 senders.Send(client.uid + ": " + SendBox.Text);
                 SendBox.Text = "";
                 spam++;
             }
         }
         else
         {
             SendBox.Text = "";
         }
     }
 }
Exemplo n.º 2
0
 private void SendButton_Click(object sender, EventArgs e)
 {
     if (!spamblocked)
     {
         if (rksent == false)
         {
             try
             {
                 start(SendBox.Text);
                 SendBox.Text = "";
             }
             catch
             {
                 error("Error starting with room key");
                 throw;
             }
         }
         else
         {
             Server.Sender sendrer = new Server.Sender();
             sendrer.Send(client.uid + ": " + SendBox.Text);
             SendBox.Text = "";
             spam++;
         }
     }
     else
     {
         SendBox.Text = "";
     }
 }
Exemplo n.º 3
0
        private void start(String rk) //Lets-a-go!
        {
            rksent = true;
            Random rnd   = new Random();
            String guest = rnd.Next(101, 1000).ToString();

            client.uid = guest;
            Server.Crypto crypto = new Server.Crypto();
            Server.Crypto.EncryptionKey = crypto.CalculateMD5Hash(rk + Server.Crypto.EncryptionKey);
            String port = new string(Server.Crypto.EncryptionKey.Where(c => char.IsDigit(c)).ToArray()).Substring(0, 4);

            Server.port = Convert.ToInt32(port);
            log("[i] Joining Room: " + Server.Crypto.EncryptionKey);
            log("[i] Room Port: " + port);
            int msg = rnd.Next(1, 3);

            String[] msgs    = new String[] { " Starting The Final Boss", " Starting The DoTS Destroyer", " Welcome to America" };
            String[] welcome = new String[] { " Has Zoomed In!", " Needs a heal!", " Is Welcomed!", " Is Here Hide Your Candy!", " Has Joined!" };

            log("[i]" + msgs[msg]);

            try
            {
                log("[i] Starting Receiver on port: " + Server.port + "...");
                Rec r = new Rec();
                r.startR();
                log("[i] Receiver Started");
            }
            catch
            {
                error("Error In Starting Receiver!");
            }
            log("[i] Starting Sender...");
            int wel = rnd.Next(1, 5);

            try
            {
                Server.Sender sender = new Server.Sender();
                sender.Send("\n" + "[i] " + client.uid + welcome[wel] + "\n");
            }
            catch
            {
                error("Error In Starting Sender!");
            }
            log("[i] Welcome " + client.uid + "! Type \"!quit\" to quit and \"!nick <nickname>\" to set your nickname");
        }
Exemplo n.º 4
0
 private void ClearChat_Click(object sender, EventArgs e) // ClearChat Button
 {
     Server.Sender senderr = new Server.Sender();
     senderr.Send("!clear");
     this.ChatBox.Text = "";
 }