public METAboltInstance(bool firstInstance)
        {
            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            Application.ApplicationExit += new EventHandler(Application_ApplicationExit);

            this.firstInstance = firstInstance;

            //LoadXMLFile(appdir + "\\MuteList.xml");
            LoadGiverItems(appdir + "\\METAgiverItems.xml");

            MakeTPTable();
            CreateLogDir();
            CreateNotesDir();
            CreateSpellingDir();

            client = new GridClient();

            config = new ConfigManager();
            config.ApplyDefault();

            SetSettings();

            netcom = new SLNetCom(client, this);
            InitializeConfig();

            state = new StateManager(this);

            imageCache = new ImageCache();

            mainForm = new frmMain(this);
            mainForm.InitializeControls();
            tabsConsole = mainForm.TabConsole;

            //CheckForShortcut();

            if (config.CurrentConfig.AIon)
            {
                //myBot = new AIMLbot.Bot();
                InitAI();
            }

            //InitAI();

            RandomPwd();

            METAbolt_Version = Properties.Resources.METAboltVersion.ToString(CultureInfo.CurrentCulture);
            //mutelist = LoadXMLFile("MuteList.xml");
            //mutelist.PrimaryKey = new DataColumn[] { mutelist.Columns["uuid"] };
        }
        public METAboltInstance(bool firstInstance, string[] args)
        {
            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            Application.ApplicationExit += new EventHandler(Application_ApplicationExit);

            this.firstInstance = firstInstance;

            //LoadXMLFile(appdir + "\\MuteList.xml");
            LoadGiverItems(appdir + "\\METAgiverItems.xml");

            MakeTPTable();
            CreateLogDir();
            CreateNotesDir();
            CreateSpellingDir();

            client = new GridClient();

            //at this point we have been given: metabolt.exe [firstname] [lastname] [password]
            //so args[0] and args[1] have the necessary name parts
            if (args.Length > 1)
            {
                string full_name = args[0] + "_" + args[1];
                config = new ConfigManager(full_name);

            }
            else
            {
                config = new ConfigManager();
            }

            config.ApplyDefault();

            SetSettings();
            netcom = new SLNetCom(client, this);

            this.rebooted = true;
            startfrombat = true;

            config.CurrentConfig.FirstName = args[0].ToString(CultureInfo.CurrentCulture);
            config.CurrentConfig.LastName = args[1].ToString(CultureInfo.CurrentCulture);
            config.CurrentConfig.PasswordMD5 = args[2].ToString(CultureInfo.CurrentCulture);

            InitializeConfig();

            imageCache = new ImageCache();
            state = new StateManager(this);

            mainForm = new frmMain(this);
            mainForm.InitializeControls();
            tabsConsole = mainForm.TabConsole;

            if (config.CurrentConfig.AIon)
            {
                //myBot = new AIMLbot.Bot();
                InitAI();
            }

            //InitAI();

            RandomPwd();

            METAbolt_Version = Properties.Resources.METAboltVersion.ToString(CultureInfo.CurrentCulture);
            //mutelist = LoadXMLFile("MuteList.xml");
            //mutelist.PrimaryKey = new DataColumn[] { mutelist.Columns["uuid"] };
        }