//starts the ping thread public void Stop() { if (pingSender.IsAlive) { pingSender.Abort(); simpleirc.DebugCallBack("\n STOPPED PINGER BY ABORTING: "); } else { simpleirc.DebugCallBack("Pinger stopped already :X \n"); } }
//parses data from dcc string and start the downloader thread public void startDownloader(string dccString, string downloaddir, string bot, string pack) { if ((dccString ?? downloaddir ?? bot ?? pack) != null && dccString.Contains("SEND") && !isDownloading) { newDccString = dccString; curDownloadDir = downloaddir; botName = bot; packNum = pack; //parsing the data for downloader thread updateStatus("Parsing"); bool isParsed = parseData(); //try to set the necesary information for the downloader if (isParsed) { //start the downloader thread downloader = new Thread(new ThreadStart(this.Downloader)); downloader.Start(); } else { simpleirc.DebugCallBack("Can't parse dcc string and start downloader, failed to parse data, removing from que\n"); ircConnect.sendMsg("/msg " + botName + " xdcc remove " + packNum); ircConnect.sendMsg("/msg " + botName + " xdcc cancel"); } } else { if (isDownloading) { simpleirc.DebugCallBack("You are already downloading! Removing from que\n"); } else { simpleirc.DebugCallBack("DCC String does not contain SEND and/or invalid values for parsing! Removing from que\n"); } ircConnect.sendMsg("/msg " + botName + " xdcc remove " + packNum); ircConnect.sendMsg("/msg " + botName + " xdcc cancel"); } }