예제 #1
0
 protected override void OnStart(string[] args)
 {
     // Todo: read this from a config
     _bot = new IrcBot();
     ConfigureBot(_bot);
     _bot.Start();
 }
예제 #2
0
        private static void ConfigureBot(IrcBot bot)
        {
            var settings = ConfigurationManager.AppSettings;

            bot.Server = settings["IrcServer"];
            bot.Port = int.Parse(settings["IrcPort"]);
            bot.Channels = settings["IrcChannels"].Split(',');
            bot.Nickname = settings["IrcNickname"];
            bot.Username = settings["IrcUsername"];
            bot.RealName = settings["IrcRealName"];

            bot.Modules.Add(new EmailBotModule());
            bot.Modules.Add(new FileRenameMonitorModule());
        }