public void Setup() { task = Task.Run(() => { using (var sc = new QueuedSynchronizationContext()) { config = CmpctConfigurationSection.GetConfiguration(); SynchronizationContext.SetSynchronizationContext(sc); log = new Log(); ircd = new IRCd(log, config); log.Initialise(ircd, config.Loggers.OfType <LoggerElement>().ToList()); ircd.Run(); sc.Run(); } } ); // Hack to give the IRCd long enough to listen before we start trying to connect to it // TODO: Can we do without this? task.Wait(100); }
/// ----------------------------------------------------------------------------- /// <summary> /// Will load the protocol, and command sets /// </summary> /// <remarks> /// </remarks> /// <history> /// [Caleb] 6/18/2005 Created /// </history> /// ----------------------------------------------------------------------------- public ServicesCore() { events = new ServicesEvents(); MyIRCd = new IRCd("Unreal", this); MyIRCd.CannotParseProtocol += new IRCd.CannotParseProtocolEventHandler(IRCd_ParseError); MyIRCd.tNoFile += new IRCd.tNoFileEventHandler(this.IRCd_NoFile); LocalClients = new LocalClientsList(this); Channels = new BlackLight.Services.Nodes.ChannelsList(); Base64 = new BlackLight.Services.Converters.Base64(); Cmds = new Hashtable(); try { LoadCmds(); Commands = new BlackLight.Services.IRCProtocol.Commands(this, MyIRCd); } catch (Exception ex) { SendLogMessage("Services", "New", BlackLight.Services.Error.Errors.ERROR, "Problem loading default startup", "", ex.Message, ex.StackTrace); } }
public void Setup() { config = CmpctConfigurationSection.GetConfiguration(); log = new Log(); ircd = new IRCd(log, config); }
/// ----------------------------------------------------------------------------- /// <summary> /// Creates instance /// </summary> /// <param name="Base">Istance of the Services Core</param> /// <param name="IRCd">Instance of the Services protocol class</param> /// <remarks> /// </remarks> /// <history> /// [Caleb] 6/18/2005 Created /// </history> /// ----------------------------------------------------------------------------- public Commands(ServicesCore Base, IRCd IRCd) { MyIRCd = IRCd; MyCore = Base; }