diff options
| author | Adam <Adam@anope.org> | 2014-12-10 02:09:51 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-12-10 02:09:51 -0500 |
| commit | 50acad5ce451b44b469890fe46ce14c7ffd031ca (patch) | |
| tree | 231101b9e475dacd58b4d03d1a69df9fe7a82f28 /modules/extra | |
| parent | 3e5a5e1c669f6027b897f7358d45f92e1552f746 (diff) | |
Unconst these config Get<Anope::string> calls as it makes no sense
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_ldap.cpp | 10 | ||||
| -rw-r--r-- | modules/extra/m_ldap_authentication.cpp | 16 | ||||
| -rw-r--r-- | modules/extra/m_ldap_oper.cpp | 10 | ||||
| -rw-r--r-- | modules/extra/m_mysql.cpp | 12 | ||||
| -rw-r--r-- | modules/extra/m_sql_authentication.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/m_sql_log.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sql_oper.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_sqlite.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/m_ssl_gnutls.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/m_ssl_openssl.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/stats/cs_fantasy_stats.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/stats/cs_fantasy_top.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/irc2sql.cpp | 8 | ||||
| -rw-r--r-- | modules/extra/stats/m_chanstats.cpp | 10 |
14 files changed, 51 insertions, 51 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index a5a6b0e3f..989f21f22 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -482,7 +482,7 @@ class ModuleLDAP : public Module, public Pipe ++it; for (i = 0; i < conf->CountBlock("ldap"); ++i) - if (conf->GetBlock("ldap", i)->Get<const Anope::string>("name", "ldap/main") == cname) + if (conf->GetBlock("ldap", i)->Get<Anope::string>("name", "ldap/main") == cname) break; if (i == conf->CountBlock("ldap")) @@ -499,14 +499,14 @@ class ModuleLDAP : public Module, public Pipe { Configuration::Block *ldap = conf->GetBlock("ldap", i); - const Anope::string &connname = ldap->Get<const Anope::string>("name", "ldap/main"); + const Anope::string &connname = ldap->Get<Anope::string>("name", "ldap/main"); if (this->LDAPServices.find(connname) == this->LDAPServices.end()) { - const Anope::string &server = ldap->Get<const Anope::string>("server", "127.0.0.1"); + const Anope::string &server = ldap->Get<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"); + const Anope::string &admin_binddn = ldap->Get<Anope::string>("admin_binddn"); + const Anope::string &admin_password = ldap->Get<Anope::string>("admin_password"); time_t timeout = ldap->Get<time_t>("timeout", "5"); try diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index dbd0344de..11d825b18 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -239,14 +239,14 @@ class NSIdentifyLDAP : public Module { Configuration::Block *conf = Config->GetModule(this); - basedn = conf->Get<const Anope::string>("basedn"); - search_filter = conf->Get<const Anope::string>("search_filter"); - object_class = conf->Get<const Anope::string>("object_class"); - username_attribute = conf->Get<const Anope::string>("username_attribute"); - this->password_attribute = conf->Get<const Anope::string>("password_attribute"); - email_attribute = conf->Get<const Anope::string>("email_attribute"); - this->disable_register_reason = conf->Get<const Anope::string>("disable_register_reason"); - this->disable_email_reason = conf->Get<const Anope::string>("disable_email_reason"); + basedn = conf->Get<Anope::string>("basedn"); + search_filter = conf->Get<Anope::string>("search_filter"); + object_class = conf->Get<Anope::string>("object_class"); + username_attribute = conf->Get<Anope::string>("username_attribute"); + this->password_attribute = conf->Get<Anope::string>("password_attribute"); + email_attribute = conf->Get<Anope::string>("email_attribute"); + this->disable_register_reason = conf->Get<Anope::string>("disable_register_reason"); + this->disable_email_reason = conf->Get<Anope::string>("disable_email_reason"); if (!email_attribute.empty()) /* Don't complain to users about how they need to update their email, we will do it for them */ diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index d999d90b6..e6460b8cd 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -100,11 +100,11 @@ class LDAPOper : public Module { Configuration::Block *config = Config->GetModule(this); - this->binddn = config->Get<const Anope::string>("binddn"); - this->password = config->Get<const Anope::string>("password"); - this->basedn = config->Get<const Anope::string>("basedn"); - this->filter = config->Get<const Anope::string>("filter"); - opertype_attribute = config->Get<const Anope::string>("opertype_attribute"); + this->binddn = config->Get<Anope::string>("binddn"); + this->password = config->Get<Anope::string>("password"); + this->basedn = config->Get<Anope::string>("basedn"); + this->filter = config->Get<Anope::string>("filter"); + opertype_attribute = config->Get<Anope::string>("opertype_attribute"); for (std::set<Oper *>::iterator it = my_opers.begin(), it_end = my_opers.end(); it != it_end; ++it) delete *it; diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index e19813354..1b8f4b6e8 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -216,7 +216,7 @@ class ModuleSQL : public Module ++it; for (i = 0; i < config->CountBlock("mysql"); ++i) - if (config->GetBlock("mysql", i)->Get<const Anope::string>("name", "mysql/main") == cname) + if (config->GetBlock("mysql", i)->Get<Anope::string>("name", "mysql/main") == cname) break; if (i == config->CountBlock("mysql")) @@ -231,14 +231,14 @@ class ModuleSQL : public Module for (int i = 0; i < config->CountBlock("mysql"); ++i) { Configuration::Block *block = config->GetBlock("mysql", i); - const Anope::string &connname = block->Get<const Anope::string>("name", "mysql/main"); + const Anope::string &connname = block->Get<Anope::string>("name", "mysql/main"); if (this->MySQLServices.find(connname) == this->MySQLServices.end()) { - const Anope::string &database = block->Get<const Anope::string>("database", "anope"); - const Anope::string &server = block->Get<const Anope::string>("server", "127.0.0.1"); - const Anope::string &user = block->Get<const Anope::string>("username", "anope"); - const Anope::string &password = block->Get<const Anope::string>("password"); + const Anope::string &database = block->Get<Anope::string>("database", "anope"); + const Anope::string &server = block->Get<Anope::string>("server", "127.0.0.1"); + const Anope::string &user = block->Get<Anope::string>("username", "anope"); + const Anope::string &password = block->Get<Anope::string>("password"); int port = block->Get<int>("port", "3306"); try diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index 8b673d6cf..16a84f7c2 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -88,9 +88,9 @@ class ModuleSQLAuthentication : public Module void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); - this->engine = config->Get<const Anope::string>("engine"); - this->query = config->Get<const Anope::string>("query"); - this->disable_reason = config->Get<const Anope::string>("disable_reason"); + this->engine = config->Get<Anope::string>("engine"); + this->query = config->Get<Anope::string>("query"); + this->disable_reason = config->Get<Anope::string>("disable_reason"); this->disable_email_reason = config->Get<Anope::string>("disable_email_reason"); this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine); diff --git a/modules/extra/m_sql_log.cpp b/modules/extra/m_sql_log.cpp index d7cee3913..313584281 100644 --- a/modules/extra/m_sql_log.cpp +++ b/modules/extra/m_sql_log.cpp @@ -25,7 +25,7 @@ class SQLLog : public Module void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); - this->table = config->Get<const Anope::string>("table", "logs"); + this->table = config->Get<Anope::string>("table", "logs"); } void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) override diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index b182370c9..6bddbf0eb 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -121,8 +121,8 @@ class ModuleSQLOper : public Module { Configuration::Block *config = conf->GetModule(this); - this->engine = config->Get<const Anope::string>("engine"); - this->query = config->Get<const Anope::string>("query"); + this->engine = config->Get<Anope::string>("engine"); + this->query = config->Get<Anope::string>("query"); this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine); } diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index 19d95c248..9370a0d77 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -115,7 +115,7 @@ class ModuleSQLite : public Module ++it; for (i = 0, num = config->CountBlock("sqlite"); i < num; ++i) - if (config->GetBlock("sqlite", i)->Get<const Anope::string>("name", "sqlite/main") == cname) + if (config->GetBlock("sqlite", i)->Get<Anope::string>("name", "sqlite/main") == cname) break; if (i == num) @@ -130,11 +130,11 @@ class ModuleSQLite : public Module for (int i = 0; i < config->CountBlock("sqlite"); ++i) { Configuration::Block *block = config->GetBlock("sqlite", i); - Anope::string connname = block->Get<const Anope::string>("name", "sqlite/main"); + Anope::string connname = block->Get<Anope::string>("name", "sqlite/main"); if (this->SQLiteServices.find(connname) == this->SQLiteServices.end()) { - Anope::string database = Anope::DataDir + "/" + block->Get<const Anope::string>("database", "anope"); + Anope::string database = Anope::DataDir + "/" + block->Get<Anope::string>("database", "anope"); try { diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp index 23e8211dd..6682da094 100644 --- a/modules/extra/m_ssl_gnutls.cpp +++ b/modules/extra/m_ssl_gnutls.cpp @@ -339,9 +339,9 @@ class GnuTLSModule : public Module { Configuration::Block *config = conf->GetModule(this); - const Anope::string certfile = config->Get<const Anope::string>("cert", "data/anope.crt"); - const Anope::string keyfile = config->Get<const Anope::string>("key", "data/anope.key"); - const Anope::string dhfile = config->Get<const Anope::string>("dh", "data/dhparams.pem"); + const Anope::string certfile = config->Get<Anope::string>("cert", "data/anope.crt"); + const Anope::string keyfile = config->Get<Anope::string>("key", "data/anope.key"); + const Anope::string dhfile = config->Get<Anope::string>("dh", "data/dhparams.pem"); CheckFile(certfile); CheckFile(keyfile); diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 4462f84c5..5b4e68ecf 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -133,8 +133,8 @@ class SSLModule : public Module { Configuration::Block *config = conf->GetModule(this); - this->certfile = config->Get<const Anope::string>("cert", "data/anope.crt"); - this->keyfile = config->Get<const Anope::string>("key", "data/anope.key"); + this->certfile = config->Get<Anope::string>("cert", "data/anope.crt"); + this->keyfile = config->Get<Anope::string>("key", "data/anope.key"); if (Anope::IsFile(this->certfile.c_str())) { diff --git a/modules/extra/stats/cs_fantasy_stats.cpp b/modules/extra/stats/cs_fantasy_stats.cpp index a5ce54d33..118a7e496 100644 --- a/modules/extra/stats/cs_fantasy_stats.cpp +++ b/modules/extra/stats/cs_fantasy_stats.cpp @@ -75,8 +75,8 @@ class CSStats : public Module void OnReload(Configuration::Conf *conf) override { - prefix = conf->GetModule("m_chanstats")->Get<const Anope::string>("prefix", "anope_"); - this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule("m_chanstats")->Get<const Anope::string>("engine")); + prefix = conf->GetModule("m_chanstats")->Get<Anope::string>("prefix", "anope_"); + this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule("m_chanstats")->Get<Anope::string>("engine")); } SQL::Result RunQuery(const SQL::Query &query) diff --git a/modules/extra/stats/cs_fantasy_top.cpp b/modules/extra/stats/cs_fantasy_top.cpp index 94197a0e5..82480ffc3 100644 --- a/modules/extra/stats/cs_fantasy_top.cpp +++ b/modules/extra/stats/cs_fantasy_top.cpp @@ -100,8 +100,8 @@ class CSTop : public Module void OnReload(Configuration::Conf *conf) override { - prefix = conf->GetModule("m_chanstats")->Get<const Anope::string>("prefix", "anope_"); - this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule("m_chanstats")->Get<const Anope::string>("engine")); + prefix = conf->GetModule("m_chanstats")->Get<Anope::string>("prefix", "anope_"); + this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule("m_chanstats")->Get<Anope::string>("engine")); } SQL::Result RunQuery(const SQL::Query &query) diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp index bc302c575..fbb56f4a7 100644 --- a/modules/extra/stats/irc2sql/irc2sql.cpp +++ b/modules/extra/stats/irc2sql/irc2sql.cpp @@ -11,18 +11,18 @@ void IRC2SQL::OnShutdown() void IRC2SQL::OnReload(Configuration::Conf *conf) { Configuration::Block *block = Config->GetModule(this); - prefix = block->Get<const Anope::string>("prefix", "anope_"); - GeoIPDB = block->Get<const Anope::string>("geoip_database"); + prefix = block->Get<Anope::string>("prefix", "anope_"); + GeoIPDB = block->Get<Anope::string>("geoip_database"); ctcpuser = block->Get<bool>("ctcpuser", "no"); ctcpeob = block->Get<bool>("ctcpeob", "yes"); - Anope::string engine = block->Get<const Anope::string>("engine"); + Anope::string engine = block->Get<Anope::string>("engine"); this->sql = ServiceReference<SQL::Provider>("SQL::Provider", engine); if (sql) this->CheckTables(); else Log() << "IRC2SQL: no database connection to " << engine; - const Anope::string &snick = block->Get<const Anope::string>("client"); + const Anope::string &snick = block->Get<Anope::string>("client"); if (snick.empty()) throw ConfigException(Module::name + ": <client> must be defined"); StatServ = ServiceBot::Find(snick, true); diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 1d299ce7a..331b1480b 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -487,13 +487,13 @@ class MChanstats : public Module void OnReload(Configuration::Conf *conf) override { Configuration::Block *block = conf->GetModule(this); - prefix = block->Get<const Anope::string>("prefix", "anope_"); - SmileysHappy = block->Get<const Anope::string>("SmileysHappy"); - SmileysSad = block->Get<const Anope::string>("SmileysSad"); - SmileysOther = block->Get<const Anope::string>("SmileysOther"); + prefix = block->Get<Anope::string>("prefix", "anope_"); + SmileysHappy = block->Get<Anope::string>("SmileysHappy"); + SmileysSad = block->Get<Anope::string>("SmileysSad"); + SmileysOther = block->Get<Anope::string>("SmileysOther"); NSDefChanstats = block->Get<bool>("ns_def_chanstats"); CSDefChanstats = block->Get<bool>("cs_def_chanstats"); - Anope::string engine = block->Get<const Anope::string>("engine"); + Anope::string engine = block->Get<Anope::string>("engine"); this->sql = ServiceReference<SQL::Provider>("SQL::Provider", engine); if (sql) this->CheckTables(); |
