From fb5b2a985e91ffb9ab49b30b74f20778ddabe1a9 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 1 May 2004 20:49:45 +0000 Subject: 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 --- src/modules/m_chanprotect.cpp | 6 ++---- 1 file 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) -- cgit v1.2.3