summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-06-29 11:28:19 +0100
committerPeter Powell <petpow@saberuk.com>2018-07-10 21:14:56 +0100
commit87361360e67d105df148ba0daa52f1164ce1d15a (patch)
treec9cf74b58ae94bf04d67caa68970ab17628da8ba /include
parente22383c6f4f4c5f16e40e04db0f14ad4b357a142 (diff)
Add InspIRCd::IsHost for checking the validity of hostnames.
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index a7f19f483..447fb8441 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -381,6 +381,12 @@ class CoreExport InspIRCd
*/
static bool DefaultIsChannel(const std::string& channel);
+ /** 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.
+ */
+ static bool IsHost(const std::string& host);
+
/** Return true if str looks like a server ID
* @param sid string to check against
*/