From d4db2b84f250b98ec3422f2be9951f567e6dc97e Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Aug 2011 00:36:04 -0400 Subject: Made the IsValidHost checks configurable --- include/config.h | 7 +++++++ include/extern.h | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index e2b626c9c..47b4c36e1 100644 --- a/include/config.h +++ b/include/config.h @@ -541,6 +541,13 @@ class CoreExport ServerConfig /* Who can use memos reciepts */ unsigned MSMemoReceipt; + /* Valid chars allowed in vhosts */ + Anope::string VhostChars; + /* Allow undotted vhosts? */ + bool VhostUndotted; + /* Chars disallowed at the beginning or end of vhosts */ + Anope::string VhostDisallowBE; + /* Core BotServ modules */ Anope::string BotCoreModules; /* Default BotServ flags */ diff --git a/include/extern.h b/include/extern.h index 1772c965c..b62997aad 100644 --- a/include/extern.h +++ b/include/extern.h @@ -159,10 +159,8 @@ E time_t dotime(const Anope::string &s); E Anope::string duration(const time_t &seconds, NickCore *nc = NULL); E Anope::string expire_left(NickCore *nc, time_t expires); E Anope::string do_strftime(const time_t &t, NickCore *nc = NULL, bool short_output = false); -E bool doValidHost(const Anope::string &host, int type); - -E bool isValidHost(const Anope::string &host, int type); -E bool isvalidchar(char c); +E bool IsValidIdent(const Anope::string &ident); +E bool IsValidHost(const Anope::string &host); E Anope::string myStrGetToken(const Anope::string &str, char dilim, int token_number); E Anope::string myStrGetTokenRemainder(const Anope::string &str, char dilim, int token_number); -- cgit