aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index f2b023f81..0b5681d0e 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -273,7 +273,7 @@ bool InspIRCd::DefaultIsIdent(const std::string& n)
return true;
}
-bool InspIRCd::IsHost(const std::string& host)
+bool InspIRCd::IsHost2(const std::string& host, bool allowsimple)
{
// Hostnames must be non-empty and shorter than the maximum hostname length.
if (host.empty() || host.length() > ServerInstance->Config->Limits.MaxHost)
@@ -329,7 +329,7 @@ bool InspIRCd::IsHost(const std::string& host)
// Whilst simple hostnames (e.g. localhost) are valid we do not allow the server to use
// them to prevent issues with clients that differentiate between short client and server
// prefixes by checking whether the nickname contains a dot.
- return numdots;
+ return numdots || allowsimple;
}
bool InspIRCd::IsSID(const std::string &str)