diff options
| author | Adam <Adam@anope.org> | 2013-05-06 07:40:43 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-05-06 07:40:43 -0400 |
| commit | ef06226521d27de88a49a84d8224568fec7624c3 (patch) | |
| tree | ac67340c29521150bbcedc995ffeb7058366fe5e /modules/extra | |
| parent | 4c669b947ff090f50fef379cfc1b2cad08ecc486 (diff) | |
Update the rest of modules.example.conf, default inspircd status modes to a sane rank incase they are prefixless, and 50 other things
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_httpd.cpp | 3 | ||||
| -rw-r--r-- | modules/extra/m_ldap.cpp | 22 | ||||
| -rw-r--r-- | modules/extra/m_ldap_authentication.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_mysql.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_proxyscan.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_xmlrpc.cpp | 5 |
6 files changed, 26 insertions, 16 deletions
diff --git a/modules/extra/m_httpd.cpp b/modules/extra/m_httpd.cpp index 5a4260149..212abfa4f 100644 --- a/modules/extra/m_httpd.cpp +++ b/modules/extra/m_httpd.cpp @@ -352,8 +352,9 @@ class HTTPD : public Module this->providers.clear(); } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *config) anope_override { + Configuration::Block *conf = config->GetModule(this); std::set<Anope::string> existing; for (int i = 0; i < conf->CountBlock("httpd"); ++i) diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 4168193a3..17ad60213 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -423,7 +423,7 @@ class ModuleLDAP : public Module, public Pipe LDAPServices.clear(); } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *config) anope_override { int i, num; @@ -433,8 +433,9 @@ class ModuleLDAP : public Module, public Pipe LDAPService *s = it->second; ++it; - for (i = 0; i < Config->CountBlock("ldap"); ++i) - if (Config->GetBlock("ldap", i)->Get<const Anope::string>("name", "ldap/main") == cname) + Configuration::Block *conf = Config->GetModule(this); + for (i = 0; i < conf->CountBlock("ldap"); ++i) + if (conf->GetBlock("ldap", i)->Get<const Anope::string>("name", "ldap/main") == cname) break; if (i == num) @@ -447,16 +448,19 @@ class ModuleLDAP : public Module, public Pipe } } - for (i = 0; i < Config->CountBlock("ldap"); ++i) + Configuration::Block *conf = config->GetModule(this); + for (i = 0; i < conf->CountBlock("ldap"); ++i) { - const Anope::string &connname = Config->GetBlock("ldap", i)->Get<const Anope::string>("name", "ldap/main"); + Configuration::Block *ldap = conf->GetBlock("ldap", i); + + const Anope::string &connname = ldap->Get<const Anope::string>("name", "ldap/main"); if (this->LDAPServices.find(connname) == this->LDAPServices.end()) { - const Anope::string &server = Config->GetBlock("ldap", i)->Get<const Anope::string>("server", "127.0.0.1"); - int port = Config->GetBlock("ldap", i)->Get<int>("port", "389"); - const Anope::string &admin_binddn = Config->GetBlock("ldap", i)->Get<const Anope::string>("admin_binddn"); - const Anope::string &admin_password = Config->GetBlock("ldap", i)->Get<const Anope::string>("admin_password"); + const Anope::string &server = ldap->Get<const Anope::string>("server", "127.0.0.1"); + int port = ldap->Get<int>("port", "389"); + const Anope::string &admin_binddn = ldap->Get<const Anope::string>("admin_binddn"); + const Anope::string &admin_password = ldap->Get<const Anope::string>("admin_password"); try { diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 4bd76ff09..08f070bb8 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -220,9 +220,9 @@ class NSIdentifyLDAP : public Module ModuleManager::SetPriority(this, PRIORITY_FIRST); } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *config) anope_override { - Configuration::Block *config = Config->GetModule(this); + Configuration::Block *conf = Config->GetModule(this); basedn = conf->Get<const Anope::string>("basedn"); search_filter = conf->Get<const Anope::string>("search_filter"); diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index a61f11e8b..8cf12ca79 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -212,9 +212,9 @@ class ModuleSQL : public Module, public Pipe } } - for (i = 0; i < Config->CountBlock("mysql"); ++i) + for (i = 0; i < config->CountBlock("mysql"); ++i) { - Configuration::Block *block = Config->GetBlock("mysql", i); + Configuration::Block *block = config->GetBlock("mysql", i); const Anope::string &connname = block->Get<const Anope::string>("name", "mysql/main"); if (this->MySQLServices.find(connname) == this->MySQLServices.end()) diff --git a/modules/extra/m_proxyscan.cpp b/modules/extra/m_proxyscan.cpp index 075f9067e..da2ab5692 100644 --- a/modules/extra/m_proxyscan.cpp +++ b/modules/extra/m_proxyscan.cpp @@ -295,9 +295,9 @@ class ModuleProxyScan : public Module } this->proxyscans.clear(); - for (int i = 0; i < conf->CountBlock("proxyscan"); ++i) + for (int i = 0; i < config->CountBlock("proxyscan"); ++i) { - Configuration::Block *block = conf->GetBlock("proxyscan", i); + Configuration::Block *block = config->GetBlock("proxyscan", i); ProxyCheck p; Anope::string token; diff --git a/modules/extra/m_xmlrpc.cpp b/modules/extra/m_xmlrpc.cpp index c1a9bc1d5..66e2db9ac 100644 --- a/modules/extra/m_xmlrpc.cpp +++ b/modules/extra/m_xmlrpc.cpp @@ -177,6 +177,11 @@ class ModuleXMLRPC : public Module if (httpref) httpref->UnregisterPage(&xmlrpcinterface); } + + void OnReload(Configuration::Conf *conf) anope_override + { + this->httpref = ServiceReference<HTTPProvider>("HTTPProvider", conf->GetModule(this)->Get<const Anope::string>("server", "httpd/main")); + } }; MODULE_INIT(ModuleXMLRPC) |
