コード例 #1
0
ファイル: IRC.Core.cs プロジェクト: AnthonyNeace/VPServices
        void loadSettings(VPServices app)
        {
            lock (mutex)
            {
                iniConfig = app.Settings.Configs["IRC"] ?? app.Settings.Configs.Add("IRC");

                config = new IrcConfig
                {
                    Host    = iniConfig.Get("Server", "localhost"),
                    Port    = iniConfig.GetInt("Port", 6667),
                    Channel = iniConfig.Get("Channel", "#vp"),

                    AutoConnect = iniConfig.GetBoolean("Autoconnect", false),
                    NickName    = iniConfig.Get("Nickname", "VPBridgeBot"),
                    RealName    = iniConfig.Get("Realname", "VPBridgeAdmin"),
                };

                Log.Debug(Name, "Loaded IRC connection settings");
            }
        }
コード例 #2
0
        void loadSettings(VPServices app)
        {
            lock (mutex)
            {
                iniConfig = app.Settings.Configs["IRC"] ?? app.Settings.Configs.Add("IRC");

                config = new IrcConfig
                {
                    Host    = iniConfig.Get("Server", "localhost"),
                    Port    = iniConfig.GetInt("Port", 6667),
                    Channel = iniConfig.Get("Channel", "#vp"),

                    AutoConnect = iniConfig.GetBoolean("Autoconnect", false),
                    NickName    = iniConfig.Get("Nickname", "VPBridgeBot"),
                    RealName    = iniConfig.Get("Realname", "VPBridgeAdmin"),
                };

                Log.Debug(Name, "Loaded IRC connection settings");
            }
        }