diff options
author | Peter Powell <petpow@saberuk.com> | 2017-11-25 12:29:05 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-11-25 13:38:02 +0000 |
commit | 3b3cb845602bbaa3935f736785a53724750230dc (patch) | |
tree | 553ec49e5f0976eee4a40141bd3da8d65da1b47a /include | |
parent | 7ece928bab20881d6fe24c4479f4ff9e0a8a7179 (diff) |
Convert IsIdent to std::function.
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index da86698a6..528092499 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -166,7 +166,6 @@ class serverstats }; DEFINE_HANDLER2(GenRandomHandler, void, char*, size_t); -DEFINE_HANDLER1(IsIdentHandler, bool, const std::string&); DEFINE_HANDLER1(IsChannelHandler, bool, const std::string&); /** The main class of the irc server. @@ -212,7 +211,6 @@ class CoreExport InspIRCd ActionList AtomicActions; /**** Functors ****/ - IsIdentHandler HandleIsIdent; IsChannelHandler HandleIsChannel; GenRandomHandler HandleGenRandom; @@ -424,11 +422,15 @@ class CoreExport InspIRCd */ static bool DefaultIsNick(const std::string& nick); - /** Return true if an ident is valid - * @param An ident to verify - * @return True if the ident is valid - */ - caller1<bool, const std::string&> IsIdent; + /** Determines whether an ident is valid. */ + TR1NS::function<bool(const std::string&)> IsIdent; + + /** Determines whether a ident is valid according to the RFC 1459 rules. + * This is the default function for InspIRCd::IsIdent. + * @param nick The ident to validate. + * @return True if the ident is valid according to RFC 1459 rules; otherwise, false. + */ + static bool DefaultIsIdent(const std::string& ident); /** Match two strings using pattern matching, optionally, with a map * to check case against (may be NULL). If map is null, match will be case insensitive. |