summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-07-10 12:46:01 +0100
committerPeter Powell <petpow@saberuk.com>2013-08-10 14:04:09 +0100
commit03a623a284b6c9f2f11f549c55333c45c4d91eab (patch)
tree1177e0b3de9e53fbaf615341db82f3740ee3d819
parentdafa2f3031c4abc7f5506385770c4fc743669b17 (diff)
Rename <connect:nouserdns> to <connect:resolvehostnames>.
This name is more descriptive and avoids a double negative which could make the name of this setting unclear to non-native speakers.
-rw-r--r--docs/conf/inspircd.conf.example8
-rw-r--r--include/users.h2
-rw-r--r--src/commands/cmd_hostname_lookup.cpp2
-rw-r--r--src/configreader.cpp4
-rw-r--r--src/modules/m_cgiirc.cpp2
-rw-r--r--src/users.cpp6
6 files changed, 12 insertions, 12 deletions
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example
index 2c75ddc7c..b34710d89 100644
--- a/docs/conf/inspircd.conf.example
+++ b/docs/conf/inspircd.conf.example
@@ -286,9 +286,9 @@
# maxconnwarn: Enable warnings when localmax or globalmax is hit (defaults to on)
maxconnwarn="off"
- # nouserdns: If enabled, no DNS lookups will be performed on connecting users
+ # resolvehostnames: If disabled, no DNS lookups will be performed on connecting users
# in this class. This can save a lot of resources on very busy servers.
- nouserdns="no"
+ resolvehostnames="yes"
# usednsbl: Defines whether or not users in this class are subject to DNSBL. Default is yes.
# This setting only has effect when m_dnsbl is loaded.
@@ -395,9 +395,9 @@
# globalmax: Maximum global (network-wide) connections per IP.
globalmax="3"
- # nouserdns: If enabled, no DNS lookups will be performed on connecting users
+ # resolvehostnames: If disabled, no DNS lookups will be performed on connecting users
# in this class. This can save a lot of resources on very busy servers.
- nouserdns="no"
+ resolvehostnames="yes"
# useident: Defines if users in this class must respond to a ident query or not.
useident="no"
diff --git a/include/users.h b/include/users.h
index aaf9b5cda..aa11a2b82 100644
--- a/include/users.h
+++ b/include/users.h
@@ -133,7 +133,7 @@ struct CoreExport ConnectClass : public refcountbase
/** If set to true, no user DNS lookups are to be performed
*/
- bool nouserdns;
+ bool resolvehostnames;
/** Create a new connect class with no settings.
*/
diff --git a/src/commands/cmd_hostname_lookup.cpp b/src/commands/cmd_hostname_lookup.cpp
index 1352f0e78..f352443d0 100644
--- a/src/commands/cmd_hostname_lookup.cpp
+++ b/src/commands/cmd_hostname_lookup.cpp
@@ -199,7 +199,7 @@ class ModuleHostnameLookup : public Module
void OnUserInit(LocalUser *user)
{
- if (!DNS || user->MyClass->nouserdns)
+ if (!DNS || !user->MyClass->resolvehostnames)
{
user->WriteNotice("*** Skipping host resolution (disabled by server administrator)");
return;
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 047a2b5cd..dba23e27f 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -309,7 +309,7 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
me->maxchans = tag->getInt("maxchans", me->maxchans);
me->maxconnwarn = tag->getBool("maxconnwarn", me->maxconnwarn);
me->limit = tag->getInt("limit", me->limit);
- me->nouserdns = tag->getBool("nouserdns", me->nouserdns);
+ me->resolvehostnames = tag->getBool("resolvehostnames", me->resolvehostnames);
ClassMap::iterator oldMask = oldBlocksByMask.find(typeMask);
if (oldMask != oldBlocksByMask.end())
@@ -350,7 +350,7 @@ static const DeprecatedConfig ChangedConfig[] = {
{ "module", "name", "m_chanprotect.so", "has been replaced with m_customprefix as of 2.2" },
{ "module", "name", "m_halfop.so", "has been replaced with m_customprefix as of 2.2" },
{ "options", "cyclehosts", "", "has been replaced with m_hostcycle as of 2.2" },
- { "performance", "nouserdns", "", "has been moved to <connect:nouserdns> as of 2.2" }
+ { "performance", "nouserdns", "", "has been moved to <connect:resolvehostnames> as of 2.2" }
};
void ServerConfig::Fill()
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 65671632d..2352fa217 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -206,7 +206,7 @@ class ModuleCgiIRC : public Module
RecheckClass(user);
// Don't create the resolver if the core couldn't put the user in a connect class or when dns is disabled
- if (user->quitting || !DNS || user->MyClass->nouserdns)
+ if (user->quitting || !DNS || !user->MyClass->resolvehostnames)
return;
CGIResolver* r = new CGIResolver(*this->DNS, this, cmd.notify, newip, user, (was_pass ? "PASS" : "IDENT"), waiting);
diff --git a/src/users.cpp b/src/users.cpp
index b49587b38..21079f0cc 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1308,7 +1308,7 @@ ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask)
: config(tag), type(t), fakelag(true), name("unnamed"), registration_timeout(0), host(mask),
pingtime(0), softsendqmax(0), hardsendqmax(0), recvqmax(0),
penaltythreshold(0), commandrate(0), maxlocal(0), maxglobal(0), maxconnwarn(true), maxchans(0),
- limit(0), nouserdns(false)
+ limit(0), resolvehostnames(true)
{
}
@@ -1318,7 +1318,7 @@ ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask, cons
softsendqmax(parent.softsendqmax), hardsendqmax(parent.hardsendqmax), recvqmax(parent.recvqmax),
penaltythreshold(parent.penaltythreshold), commandrate(parent.commandrate),
maxlocal(parent.maxlocal), maxglobal(parent.maxglobal), maxconnwarn(parent.maxconnwarn), maxchans(parent.maxchans),
- limit(parent.limit), nouserdns(parent.nouserdns)
+ limit(parent.limit), resolvehostnames(parent.resolvehostnames)
{
}
@@ -1341,5 +1341,5 @@ void ConnectClass::Update(const ConnectClass* src)
maxconnwarn = src->maxconnwarn;
maxchans = src->maxchans;
limit = src->limit;
- nouserdns = src->nouserdns;
+ resolvehostnames = src->resolvehostnames;
}