mirror of
https://github.com/matrix-construct/construct
synced 2024-11-19 00:10:59 +01:00
ircd: rename mask_match() to match_mask().
This commit is contained in:
parent
f5143fbf73
commit
2352528ffb
3 changed files with 6 additions and 6 deletions
|
@ -32,13 +32,13 @@ namespace ircd {
|
|||
* match - compare name with mask, mask may contain * and ? as wildcards
|
||||
* match - returns 1 on successful match, 0 otherwise
|
||||
*
|
||||
* mask_match - compare one mask to another
|
||||
* match_mask - like match() but a '?' in mask does not match a '*' in name
|
||||
* match_esc - compare with support for escaping chars
|
||||
* match_cidr - compares u!h@addr with u!h@addr/cidr
|
||||
* match_ips - compares addr with addr/cidr in ascii form
|
||||
*/
|
||||
extern int match(const char *mask, const char *name);
|
||||
extern int mask_match(const char *oldmask, const char *newmask);
|
||||
extern int match_mask(const char *oldmask, const char *newmask);
|
||||
extern int match_esc(const char *mask, const char *name);
|
||||
extern int match_cidr(const char *mask, const char *name);
|
||||
extern int match_ips(const char *mask, const char *name);
|
||||
|
|
|
@ -282,7 +282,7 @@ chan::add_id(client *source_p, chan *chptr, const char *banid, const char *forwa
|
|||
RB_DLINK_FOREACH(ptr, list->head)
|
||||
{
|
||||
actualBan = (ban *)ptr->data;
|
||||
if(mask_match(actualBan->banstr.c_str(), realban))
|
||||
if(match_mask(actualBan->banstr.c_str(), realban))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,14 +104,14 @@ int match(const char *mask, const char *name)
|
|||
* This test checks using traditional IRC wildcards only: '*' means
|
||||
* match zero or more characters of any type; '?' means match exactly
|
||||
* one character of any type.
|
||||
* The difference between mask_match() and match() is that in mask_match()
|
||||
* The difference between match_mask() and match() is that in match_mask()
|
||||
* a '?' in mask does not match a '*' in name.
|
||||
*
|
||||
* @param[in] mask Existing wildcard-containing mask.
|
||||
* @param[in] name New wildcard-containing mask.
|
||||
* @return 1 if \a name is equal to or more specific than \a mask, 0 otherwise.
|
||||
*/
|
||||
int mask_match(const char *mask, const char *name)
|
||||
int match_mask(const char *mask, const char *name)
|
||||
{
|
||||
const char *m = mask, *n = name;
|
||||
const char *m_tmp = mask, *n_tmp = name;
|
||||
|
@ -141,7 +141,7 @@ int mask_match(const char *mask, const char *name)
|
|||
star_p = 1;
|
||||
else if (*m == '?')
|
||||
{
|
||||
/* changed for mask_match() */
|
||||
/* changed for match_mask() */
|
||||
if (*n == '*' || !*n)
|
||||
goto backtrack;
|
||||
n++;
|
||||
|
|
Loading…
Reference in a new issue