1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 20:43:13 +02:00

That doesn't work either, just don't use references.

find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
This commit is contained in:
Adam
2013-05-05 21:05:43 -04:00
parent 3e8752fe66
commit 5b3f81ea78
64 changed files with 260 additions and 266 deletions
+5 -5
View File
@@ -352,12 +352,12 @@ class MChanstats : public Module
void OnReload(Configuration::Conf *conf) anope_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<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");
Anope::string engine = block->Get<const Anope::string &>("engine");
Anope::string engine = block->Get<const Anope::string>("engine");
this->sql = ServiceReference<SQL::Provider>("SQL::Provider", engine);
if (sql)
this->CheckTables();
+4 -4
View File
@@ -361,15 +361,15 @@ class HTTPD : public Module
Configuration::Block *block = conf->GetBlock("httpd", i);
const Anope::string &hname = block->Get<const Anope::string &>("name", "httpd/main");
const Anope::string &hname = block->Get<const Anope::string>("name", "httpd/main");
existing.insert(hname);
Anope::string ip = block->Get<const Anope::string &>("ip");
Anope::string ip = block->Get<const Anope::string>("ip");
int port = block->Get<int>("port", "8080");
int timeout = block->Get<int>("timeout", "30");
bool ssl = block->Get<bool>("ssl", "no");
Anope::string ext_ip = block->Get<const Anope::string &>("extforward_ip");
Anope::string ext_header = block->Get<const Anope::string &>("extforward_header");
Anope::string ext_ip = block->Get<const Anope::string>("extforward_ip");
Anope::string ext_header = block->Get<const Anope::string>("extforward_header");
if (ip.empty())
{
+5 -5
View File
@@ -434,7 +434,7 @@ class ModuleLDAP : public Module, public Pipe
++it;
for (i = 0; i < Config->CountBlock("ldap"); ++i)
if (Config->GetBlock("ldap", i)->Get<const Anope::string &>("name", "ldap/main") == cname)
if (Config->GetBlock("ldap", i)->Get<const Anope::string>("name", "ldap/main") == cname)
break;
if (i == num)
@@ -449,14 +449,14 @@ class ModuleLDAP : public Module, public Pipe
for (i = 0; i < Config->CountBlock("ldap"); ++i)
{
const Anope::string &connname = Config->GetBlock("ldap", i)->Get<const Anope::string &>("name", "ldap/main");
const Anope::string &connname = Config->GetBlock("ldap", i)->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");
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 &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");
try
{
+8 -8
View File
@@ -225,14 +225,14 @@ class NSIdentifyLDAP : public Module
{
Configuration::Block *config = 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<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");
if (!email_attribute.empty())
/* Don't complain to users about how they need to update their email, we will do it for them */
+5 -5
View File
@@ -97,11 +97,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<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");
for (std::set<Oper *>::iterator it = my_opers.begin(), it_end = my_opers.end(); it != it_end; ++it)
delete *it;
+6 -6
View File
@@ -200,7 +200,7 @@ class ModuleSQL : public Module, public Pipe
++it;
for (i = 0; i < Config->CountBlock("mysql"); ++i)
if (Config->GetBlock("mysql", i)->Get<const Anope::string &>("name", "main") == cname)
if (Config->GetBlock("mysql", i)->Get<const Anope::string>("name", "main") == cname)
break;
if (i == num)
@@ -215,14 +215,14 @@ class ModuleSQL : public Module, public Pipe
for (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<const 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<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");
int port = block->Get<int>("port", "3306");
try
+8 -8
View File
@@ -257,7 +257,7 @@ class ModuleProxyScan : public Module
{
Configuration::Block *config = Config->GetModule(this);
Anope::string s_target_ip = config->Get<const Anope::string &>("target_ip");
Anope::string s_target_ip = config->Get<const Anope::string>("target_ip");
if (s_target_ip.empty())
throw ConfigException(this->name + " target_ip may not be empty");
@@ -265,7 +265,7 @@ class ModuleProxyScan : public Module
if (s_target_port <= 0)
throw ConfigException(this->name + " target_port may not be empty and must be a positive number");
Anope::string s_listen_ip = config->Get<const Anope::string &>("listen_ip");
Anope::string s_listen_ip = config->Get<const Anope::string>("listen_ip");
if (s_listen_ip.empty())
throw ConfigException(this->name + " listen_ip may not be empty");
@@ -277,12 +277,12 @@ class ModuleProxyScan : public Module
target_port = s_target_port;
this->listen_ip = s_listen_ip;
this->listen_port = s_listen_port;
this->con_notice = config->Get<const Anope::string &>("connect_notice");
this->con_source = config->Get<const Anope::string &>("connect_source");
this->con_notice = config->Get<const Anope::string>("connect_notice");
this->con_source = config->Get<const Anope::string>("connect_source");
add_to_akill = config->Get<bool>("add_to_akill", "true");
this->connectionTimeout.SetSecs(config->Get<time_t>("timeout", "5s"));
ProxyCheckString = Config->GetBlock("networkinfo")->Get<const Anope::string &>("networkname") + " proxy check";
ProxyCheckString = Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname") + " proxy check";
delete this->listener;
this->listener = NULL;
try
@@ -301,7 +301,7 @@ class ModuleProxyScan : public Module
ProxyCheck p;
Anope::string token;
commasepstream sep(block->Get<const Anope::string &>("type"));
commasepstream sep(block->Get<const Anope::string>("type"));
while (sep.GetToken(token))
{
if (!token.equals_ci("HTTP") && !token.equals_ci("SOCKS5"))
@@ -311,7 +311,7 @@ class ModuleProxyScan : public Module
if (p.types.empty())
continue;
commasepstream sep2(block->Get<const Anope::string &>("port"));
commasepstream sep2(block->Get<const Anope::string>("port"));
while (sep2.GetToken(token))
{
try
@@ -325,7 +325,7 @@ class ModuleProxyScan : public Module
continue;
p.duration = block->Get<time_t>("time", "4h");
p.reason = block->Get<const Anope::string &>("reason");
p.reason = block->Get<const Anope::string>("reason");
if (p.reason.empty())
continue;
+3 -3
View File
@@ -85,9 +85,9 @@ class ModuleSQLAuthentication : public Module
void OnReload(Configuration::Conf *conf) anope_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<const Anope::string>("engine");
this->query = config->Get<const Anope::string>("query");
this->disable_reason = config->Get<const Anope::string>("disable_reason");
this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine);
}
+2 -2
View File
@@ -105,8 +105,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<const Anope::string>("engine");
this->query = config->Get<const Anope::string>("query");
this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine);
}
+3 -3
View File
@@ -89,7 +89,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<const Anope::string>("name", "sqlite/main") == cname)
break;
if (i == num)
@@ -104,11 +104,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<const 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<const Anope::string>("database", "anope");
try
{
+2 -2
View File
@@ -140,8 +140,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<const Anope::string>("cert", "data/anope.crt");
this->keyfile = config->Get<const Anope::string>("key", "data/anope.key");
if (Anope::IsFile(this->certfile.c_str()))
{
+3 -3
View File
@@ -53,10 +53,10 @@ class ModuleWebCPanel : public Module
me = this;
Configuration::Block *block = Config->GetModule(this);
provider_name = block->Get<const Anope::string &>("server", "httpd/main");
template_name = block->Get<const Anope::string &>("template", "default");
provider_name = block->Get<const Anope::string>("server", "httpd/main");
template_name = block->Get<const Anope::string>("template", "default");
template_base = Anope::DataDir + "/modules/webcpanel/templates/" + template_name;
page_title = block->Get<const Anope::string &>("title", "Anope IRC Services");
page_title = block->Get<const Anope::string>("title", "Anope IRC Services");
use_ssl = block->Get<bool>("ssl", "no"); // This is dumb, is there a better way to do this?
ServiceReference<HTTPProvider> provider("HTTPProvider", provider_name);