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
This commit is contained in:
brain 2004-05-01 20:49:45 +00:00
parent 0f2cf28d39
commit fb5b2a985e

View File

@ -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)