Beispiel #1
0
        private void GenerateNewConfigurationFile()
        {
            _logger.Log(LogLevel.Debug, Name, "Creating a new configuration file");
            IrcPluginConfiguration config = new IrcPluginConfiguration();

            config.Enabled  = false;
            config.Server   = "irc.esper.net";
            config.Channel  = "#C#raft";
            config.Nickname = "ChraftBot";
            config.Port     = 6667;

            XmlSerializer serializer = new XmlSerializer(typeof(IrcPluginConfiguration));
            TextWriter    textWriter = new StreamWriter(ConfigurationFilename);

            serializer.Serialize(textWriter, config);
            textWriter.Close();
        }
Beispiel #2
0
        private void GenerateNewConfigurationFile()
        {
            _logger.Log(LogLevel.Debug, Name, "Creating a new configuration file");
            IrcPluginConfiguration config = new IrcPluginConfiguration();
            config.Enabled = false;
            config.Server = "irc.esper.net";
            config.Channel = "#C#raft";
            config.Nickname = "ChraftBot";
            config.Port = 6667;

            XmlSerializer serializer = new XmlSerializer(typeof(IrcPluginConfiguration));
            TextWriter textWriter = new StreamWriter(ConfigurationFilename);
            serializer.Serialize(textWriter, config);
            textWriter.Close();
        }