summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd_acl.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-02 19:03:07 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-02 19:03:07 +0000
commit9d4004e8d477232c143830508a7a6e41fd2d31b7 (patch)
tree6808c9d90e272300062ce76eae5f7b7b445166a1 /src/modules/m_httpd_acl.cpp
parentf2256deeefe9a9f57f6f6b902604c01138ad16cc (diff)
Allow opermotd to specify its file in <files> without also requiring an <opermotd> block
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12355 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd_acl.cpp')
-rw-r--r--src/modules/m_httpd_acl.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp
index 0086cdd0f..94cc4045f 100644
--- a/src/modules/m_httpd_acl.cpp
+++ b/src/modules/m_httpd_acl.cpp
@@ -46,12 +46,12 @@ class ModuleHTTPAccessList : public Module
void ReadConfig()
{
acl_list.clear();
- ConfigReader c;
- int n_items = c.Enumerate("httpdacl");
- for (int i = 0; i < n_items; ++i)
+ ConfigTagList acls = ServerInstance->Config->ConfTags("httpdacl");
+ for (ConfigIter i = acls.first; i != acls.second; i++)
{
- std::string path = c.ReadValue("httpdacl", "path", i);
- std::string types = c.ReadValue("httpdacl", "types", i);
+ ConfigTag* c = i->second;
+ std::string path = c->getString("path");
+ std::string types = c->getString("types");
irc::commasepstream sep(types);
std::string type;
std::string username;
@@ -63,16 +63,16 @@ class ModuleHTTPAccessList : public Module
{
if (type == "password")
{
- username = c.ReadValue("httpdacl", "username", i);
- password = c.ReadValue("httpdacl", "password", i);
+ username = c->getString("username");
+ password = c->getString("password");
}
else if (type == "whitelist")
{
- whitelist = c.ReadValue("httpdacl", "whitelist", i);
+ whitelist = c->getString("whitelist");
}
else if (type == "blacklist")
{
- blacklist = c.ReadValue("httpdacl", "blacklist", i);
+ blacklist = c->getString("blacklist");
}
else
{