aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index edba04d24..3ad291909 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -390,9 +390,16 @@ class CoreExport InspIRCd
/** Determines whether a hostname is valid according to RFC 5891 rules.
* @param host The hostname to validate.
+ * @param allowsimple Whether to allow simple hostnames (e.g. localhost).
* @return True if the hostname is valid; otherwise, false.
*/
- static bool IsHost(const std::string& host);
+ static bool IsHost2(const std::string& host, bool allowsimple);
+
+ /** Determines whether a hostname is valid according to RFC 5891 rules.
+ * @param host The hostname to validate.
+ * @return True if the hostname is valid; otherwise, false.
+ */
+ inline static bool IsHost(const std::string& host) { return IsHost2(host, false); }
/** Return true if str looks like a server ID
* @param sid string to check against