public JoinMessageService( ILogger logger, IResponder responder, ISession session, ModuleConfiguration configuration, IGeolocationService geolocationService, IIrcClient client, IBlockMonitoringService blockMonitoringService) { this.logger = logger; this.responder = responder; this.session = session; this.configuration = configuration.JoinMessageRateLimits; this.geolocationService = geolocationService; this.client = client; this.blockMonitoringService = blockMonitoringService; this.blockMonitoringService.JoinMessageService = this; }
public BlockMonitorConfigurationCommand( string commandSource, IUser user, IList <string> arguments, ILogger logger, IFlagService flagService, IConfigurationProvider configurationProvider, IIrcClient client, IBlockMonitoringService blockMonitoringService, ISession databaseSession, IResponder responder) : base( commandSource, user, arguments, logger, flagService, configurationProvider, client) { this.blockMonitoringService = blockMonitoringService; this.databaseSession = databaseSession; this.responder = responder; }
/// <summary> /// The initialise bot. /// </summary> private static void InitialiseBot() { dbal = container.Resolve<ILegacyDatabase>(); if (!dbal.Connect()) { // can't Connect to database, DIE return; } LegacyConfig.Singleton(); var configurationHelper = container.Resolve<IConfigurationHelper>(); INetworkClient networkClient; if (configurationHelper.IrcConfiguration.Ssl) { networkClient = new SslNetworkClient( configurationHelper.IrcConfiguration.Hostname, configurationHelper.IrcConfiguration.Port, container.Resolve<ILogger>().CreateChildLogger("NetworkClient")); } else { networkClient = new NetworkClient( configurationHelper.IrcConfiguration.Hostname, configurationHelper.IrcConfiguration.Port, container.Resolve<ILogger>().CreateChildLogger("NetworkClient")); } newIrc = new IrcClient( networkClient, container.Resolve<ILogger>().CreateChildLogger("IrcClient"), configurationHelper.IrcConfiguration, configurationHelper.PrivateConfiguration.IrcPassword); JoinChannels(); // TODO: remove me! container.Register(Component.For<IIrcClient>().Instance(newIrc)); joinMessageService = container.Resolve<IJoinMessageService>(); blockMonitoringService = container.Resolve<IBlockMonitoringService>(); SetupEvents(); // initialise the deferred installers. container.Install(FromAssembly.This(new DeferredWindsorBootstrap())); }