* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
#include "protocol.h"
/* $ModDesc: Provides access control lists (passwording of resources, ip restrictions etc) to m_httpd.so dependent modules */
-/* $ModDep: httpd.h */
-class HTTPACL : public Extensible
+class HTTPACL
{
public:
std::string path;
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;
{
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
{