summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-01 20:49:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-01 20:49:45 +0000
commitfb5b2a985e91ffb9ab49b30b74f20778ddabe1a9 (patch)
tree502379145681a33ec7e805e1dd2bb9ba4ad3602a
parent0f2cf28d39404881b9719330ca86757c51b87bad (diff)
Tidied the code to use Azhrarns new ConfigReader::ReadFlag method
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@773 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_chanprotect.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index ce43a90a4..1fdb80ea5 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -32,8 +32,7 @@ class ModuleChanProtect : public Module
Srv->AddExtendedListMode('q');
// read our config options (main config file)
- std::string val = Conf->ReadValue("options","noservices",0);
- FirstInGetsFounder = ((val == "yes") || (val == "1") || (val == "true"));
+ FirstInGetsFounder = Conf->ReadFlag("options","noservices",0);
}
virtual void OnRehash()
@@ -42,8 +41,7 @@ class ModuleChanProtect : public Module
delete Conf;
Conf = new ConfigReader;
// re-read our config options on a rehash
- std::string val = Conf->ReadValue("options","noservices",0);
- FirstInGetsFounder = ((val == "yes") || (val == "1") || (val == "true"));
+ FirstInGetsFounder = Conf->ReadFlag("options","noservices",0);
}
virtual void OnUserJoin(userrec* user, chanrec* channel)