Esempio n. 1
0
        /// <summary>
        /// Called after all default plugins are loaded, at which point it is safe to assume that any dependencies are loaded.
        /// </summary>
        public void Initialize()
        {
            _logger = Server.GetPluginLogger();
            _logger.Log(LogLevel.Info, Name, "Initialize ircplugin Version {0}.", Version);

            _logger.Log(LogLevel.Debug, Name, "Checking folder {0}", ConfigurationDirectory);
            if (!Directory.Exists(ConfigurationDirectory))
            {
                Directory.CreateDirectory(ConfigurationDirectory);
            }

            _logger.Log(LogLevel.Debug, Name, "Checking configfile {0}", ConfigurationFilename);
            if (!File.Exists(ConfigurationFilename))
            {
                GenerateNewConfigurationFile();
            }

            LoadConfigurationFile();

            _serverListener = new IrcPluginServerListener(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Called after all default plugins are loaded, at which point it is safe to assume that any dependencies are loaded.
        /// </summary>
        public void Initialize()
        {
            _logger = Server.GetPluginLogger();
            _logger.Log(LogLevel.Info, Name, "Initialize ircplugin Version {0}.", Version);

            _logger.Log(LogLevel.Debug, Name, "Checking folder {0}", ConfigurationDirectory);
            if (!Directory.Exists(ConfigurationDirectory)) { Directory.CreateDirectory(ConfigurationDirectory); }

            _logger.Log(LogLevel.Debug, Name, "Checking configfile {0}", ConfigurationFilename);
            if (!File.Exists(ConfigurationFilename))
            {
                GenerateNewConfigurationFile();
            }

            LoadConfigurationFile();

            _serverListener = new IrcPluginServerListener(this);
        }