public Parser(ircBot bot) { _bot = bot; _serverMsg = new Hashtable(); _serverMsg.Add("353", new Reply353(_bot)); _serverMsg.Add("JOIN", new ReplyJOIN(_bot)); _serverMsg.Add("NICK", new ReplyNICK(_bot)); _serverMsg.Add("KICK", new ReplyKICK(_bot)); _serverMsg.Add("PART", new ReplyPART(_bot)); _serverMsg.Add("376", new Reply376(_bot)); }
static void Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; Config config = new Config("config.ini"); Console.Title = config.getNickname() + " @" + config.getHostname(); ServerInfo rizonInfo = new ServerInfo(config.getHostname(), 6667, config.getNickname(), config.getUsername()); ircBot rizon = new ircBot(rizonInfo, config.getNickServ(), config); Thread rizonTypper = new Thread(rizon.typper); Thread rizonBot = new Thread(rizon.ircWork); rizonBot.Start(); rizonTypper.Start(); }