summaryrefslogtreecommitdiff
path: root/src/modules/m_chanprotect.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-10-06 21:43:20 +0200
committerattilamolnar <attilamolnar@hush.com>2012-11-12 21:48:42 +0100
commita4db7bf9af00b32d4f5c1922997d02b0b8be59e5 (patch)
tree2fd4c4ee2344300285f919968760f27f9ca41df4 /src/modules/m_chanprotect.cpp
parent62149fcd86711d3ca7457a327c4e8fa2e7d85582 (diff)
Remove usage of the deprecated ConfigReader
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r--src/modules/m_chanprotect.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 2a46f2f17..85405ec25 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -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)