]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/wildcard.h
Convert CIDR matching and wildcard matching to operate on std::strings
[user/henk/code/inspircd.git] / include / wildcard.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 /** Match a string against a mask.
15  * @param str The string to check
16  * @param mask the mask to check against
17  * @return true if the strings match
18  */
19 CoreExport bool match(const std::string &str, const std::string &mask);
20 /** Match a string against a mask, and define wether or not to use CIDR rules
21  * @param str The string to check
22  * @param mask the mask to check against
23  * @param use_cidr_match True if CIDR matching rules should be applied first
24  * @return true if the strings match
25  */
26 CoreExport bool match(const std::string &str, const std::string &mask, bool use_cidr_match);
27 /** Match a string against a mask, defining wether case sensitivity applies.
28  * @param str The string to check
29  * @param mask the mask to check against
30  * @param case_sensitive True if the match is case sensitive
31  * @return True if the strings match
32  */
33 CoreExport bool match(bool case_sensitive, const std::string &str, const std::string &mask);
34 /** Match a string against a mask, defining wether case sensitivity applies,
35  * and defining wether or not to use CIDR rules first.
36  * @param case_sensitive True if the match is case sensitive
37  * @param str The string to check
38  * @param mask the mask to check against
39  * @param use_cidr_match True if CIDR matching rules should be applied first
40  * @return true if the strings match
41  */
42 CoreExport bool match(bool case_sensitive, const std::string &str, const std::string &mask, bool use_cidr_match);
43