]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
Add a typedef for LocalUserList
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index 2a46f2f17828a1fdfc6c427c64a8a8aab1fa182e..85405ec25e9bb90ffa212d96b438b3c237d58eac 100644 (file)
@@ -260,14 +260,14 @@ class ModuleChanProtect : public Module
 
        void LoadSettings()
        {
-               ConfigReader Conf;
+               ConfigTag* tag = ServerInstance->Config->ConfValue("chanprotect");
 
-               settings.FirstInGetsFounder = Conf.ReadFlag("chanprotect", "noservices", 0);
+               settings.FirstInGetsFounder = tag->getBool("noservices");
 
-               std::string qpre = Conf.ReadValue("chanprotect", "qprefix", 0);
+               std::string qpre = tag->getString("qprefix");
                char QPrefix = qpre.empty() ? 0 : qpre[0];
 
-               std::string apre = Conf.ReadValue("chanprotect", "aprefix", 0);
+               std::string apre = tag->getString("aprefix");
                char APrefix = apre.empty() ? 0 : apre[0];
 
                if ((APrefix && QPrefix) && APrefix == QPrefix)
@@ -284,8 +284,8 @@ class ModuleChanProtect : public Module
                        cp.setPrefix(APrefix);
                        cf.setPrefix(QPrefix);
                }
-               settings.DeprivSelf = Conf.ReadFlag("chanprotect","deprotectself", "yes", 0);
-               settings.DeprivOthers = Conf.ReadFlag("chanprotect","deprotectothers", "yes", 0);
+               settings.DeprivSelf = tag->getBool("deprotectself", true);
+               settings.DeprivOthers = tag->getBool("deprotectothers", true);
        }
 
        ModResult OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven)