Skype API help and acting very weird
I've made a big app for Skype called (Skype PWN4G3) one of its features are these lines of code:

//Control's

     private void botOn_Click(object sender, EventArgs e)
            {
                if (toolStripLabel5.Text == "Not attached")
                {
                    MessageBox.Show(notAttached, "Skype Pwnage - Info!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {
                    botStop = false;
                    skype.Attach(7, false);
                    skype.MessageStatus += new _ISkypeEvents_MessageStatusEventHandler(skype_MessageStatus);
                    botOn.Text = "Running";
                    botOn.Enabled = false;
                    botOff.Enabled = true;
                }
            }
    
            private void botOff_Click(object sender, EventArgs e)
            {
                botStop = true;
                botOn.Text = "Enable";
                botOn.Enabled = true;
                botOff.Enabled = false;
            }


//Function

    private void skype_MessageStatus(ChatMessage msg, TChatMessageStatus status)
    {
        if (botStop == true)
        {
        }
        else
        {
            try
            {
                string command = msg.Body.Remove(0, trigger.Length).ToLower();
                string[] lines = richTextBox4.Text.Split('\n');
                foreach (string ln in lines)
                {
                    string[] commands = ln.Split(':');
                    if (radioButton6.Checked == true)
                    {
                        if (command.Contains(commands[0]))
                        {
                            listBox2.Items.Add(DateTime.Now +"> "+ commands[0]);
                            skype.SendMessage(msg.Sender.Handle, string.Format(commands[1]));
                            break;
                        }
                    }
                        if (radioButton4.Checked == true)
                        {
                            if (command == commands[0])
                            {
                                listBox2.Items.Add(DateTime.Now + "> " + commands[0]);
                                skype.SendMessage(msg.Sender.Handle, string.Format(commands[1]));
                                break;
                            }
                        }
                    }
                }
            catch (Exception err0)
            {
            }

        }
    } 




Now my issue is this code work's great and it will reply auto to a person if they say a certain word. But it's very odd acting.
If you start the bot with the Skype window minimized and let it do it's work it work's great until you stop then start it or change the radio button from "Exact" to "Contains" then the next time it runs it will reply 2 times, then if you do the above again it will reply 3 times and so on, 

One other very odd problem is that once you open your Skype window and view the messages from your side it re-seneds them all again. Any idea why?

And one more extra if anyone know's how I can stop / start this correctly that would be fantastic. And if you know how to make it so this will not listen to messages from chat groups and only PM's that would be great because right now it will listen to chat then send to User.Handle unless I can make some way to have it send into chat where the message was sent.
Skype API help and acting very weird
===

I've made a big app for Skype called (Skype PWN4G3) one of its features are these lines of code:

//Control's

     private void botOn_Click(object sender, EventArgs e)
            {
                if (toolStripLabel5.Text == "Not attached")
                {
                    MessageBox.Show(notAttached, "Skype Pwnage - Info!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {
                    botStop = false;
                    skype.Attach(7, false);
                    skype.MessageStatus += new _ISkypeEvents_MessageStatusEventHandler(skype_MessageStatus);
                    botOn.Text = "Running";
                    botOn.Enabled = false;
                    botOff.Enabled = true;
                }
            }
    
            private void botOff_Click(object sender, EventArgs e)
            {
                botStop = true;
                botOn.Text = "Enable";
                botOn.Enabled = true;
                botOff.Enabled = false;
            }


//Function

    private void skype_MessageStatus(ChatMessage msg, TChatMessageStatus status)
    {
        if (botStop == true)
        {
        }
        else
        {
            try
            {
                string command = msg.Body.Remove(0, trigger.Length).ToLower();
                string[] lines = richTextBox4.Text.Split('\n');
                foreach (string ln in lines)
                {
                    string[] commands = ln.Split(':');
                    if (radioButton6.Checked == true)
                    {
                        if (command.Contains(commands[0]))
                        {
                            listBox2.Items.Add(DateTime.Now +"> "+ commands[0]);
                            skype.SendMessage(msg.Sender.Handle, string.Format(commands[1]));
                            break;
                        }
                    }
                        if (radioButton4.Checked == true)
                        {
                            if (command == commands[0])
                            {
                                listBox2.Items.Add(DateTime.Now + "> " + commands[0]);
                                skype.SendMessage(msg.Sender.Handle, string.Format(commands[1]));
                                break;
                            }
                        }
                    }
                }
            catch (Exception err0)
            {
            }

        }
    } 




Now my issue is this code work's great and it will reply auto to a person if they say a certain word. But it's very odd acting.
If you start the bot with the Skype window minimized and let it do it's work it work's great until you stop then start it or change the radio button from "Exact" to "Contains" then the next time it runs it will reply 2 times, then if you do the above again it will reply 3 times and so on, 

One other very odd problem is that once you open your Skype window and view the messages from your side it re-seneds them all again. Any idea why?

And one more extra if anyone know's how I can stop / start this correctly that would be fantastic. And if you know how to make it so this will not listen to messages from chat groups and only PM's that would be great because right now it will listen to chat then send to User.Handle unless I can make some way to have it send into chat where the message was sent.