public void Initialize() { IrcClient.Connect(Settings.Host, Settings.Port); LogInformation(string.Format("IrcBot Connecting to {0}:{1}", Settings.Host, Settings.Port)); if (IrcClient.IsConnected) IrcClient.Login(Settings.BotName, Settings.RealBotName); foreach (string channel in Settings.Channels) { string channelname = MakeValidChannel(channel); LogInformation(string.Format("Joining {0}", channelname)); IrcClient.RfcJoin(channelname); } PluginManager = new PluginManager(string.Format("{0}{1}", FilePath, Settings.PluginFolder), this); PluginManager.LoadPluginsBlind(); foreach (BotPlugin plugin in PluginManager.Plugins) plugin.LoadCommands(); AdminUserRepository = new AdminRepository(Settings.AdminPass, FilePath); AdminUserRepository.LoadAdmins(); SendMessageToAdmins("IrcBot is online and you are admin."); IrcClient.Listen(); }