From af90c155f468b78540aad3182e2e9909203fc68e Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 7 Apr 2004 16:17:48 +0000 Subject: [PATCH] Modified to support wildcard matching of glob patterns git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@414 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/modules.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/modules.h b/include/modules.h index 3e2b8c5bb..28c3f525e 100644 --- a/include/modules.h +++ b/include/modules.h @@ -438,6 +438,12 @@ class Server : public classbase * action after calling this method is to immediately bail from your handler. */ virtual void QuitUser(userrec* user, std::string reason); + + /** Matches text against a glob pattern. + * Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com + * Returns true if the literal successfully matches the pattern, false if otherwise. + */ + virtual bool MatchText(std::string sliteral, std::string spattern); }; /** Allows reading of values from configuration files @@ -449,9 +455,11 @@ class Server : public classbase class ConfigReader : public classbase { protected: - /** The filename of the configuration file, as set by the constructor. + /** The contents of the configuration file + * This protected member should never be accessed by a module (and cannot be accessed unless the + * core is changed). It will contain a pointer to the configuration file data with unneeded data + * (such as comments) stripped from it. */ - std::string fname; std::stringstream *cache; public: /** Default constructor. -- 2.39.5