summaryrefslogtreecommitdiff
path: root/src/operserv.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-18 23:34:32 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-18 23:34:32 +0000
commite11b5b5acedaa0fdd73394e6277ca0ae39f8e4c7 (patch)
tree380694631fb85b75f174db13f13a791b27076a4f /src/operserv.c
parent12cc6334576c61933383783e94a7b12c818b080b (diff)
Patch from DP, converting all match calls and removing old match method.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2111 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/operserv.c')
-rw-r--r--src/operserv.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/operserv.c b/src/operserv.c
index b0e0d0f0c..1ba950933 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -542,7 +542,7 @@ int add_akill(User * u, const char *mask, const char *by, const time_t expires,
}
}
- if (match_wild_nocase(amask, mask)
+ if (Anope::Match(mask, amask, false)
&& (entry->expires >= expires || entry->expires == 0)) {
if (u)
notice_lang(s_OperServ, u, OPER_AKILL_ALREADY_COVERED,
@@ -550,7 +550,7 @@ int add_akill(User * u, const char *mask, const char *by, const time_t expires,
return -1;
}
- if (match_wild_nocase(mask, amask)
+ if (Anope::Match(amask, mask, false)
&& (entry->expires <= expires || expires == 0)) {
slist_delete(&akills, i);
deleted++;
@@ -628,16 +628,16 @@ int check_akill(const char *nick, const char *username, const char *host,
ak = static_cast<Akill *>(akills.list[i]);
if (!ak)
continue;
- if (match_wild_nocase(ak->user, username)
- && match_wild_nocase(ak->host, host)) {
+ if (Anope::Match(username, ak->user, false)
+ && Anope::Match(host, ak->host, false)) {
ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton,
ak->expires, ak->reason);
return 1;
}
if (ircd->vhost) {
if (vhost) {
- if (match_wild_nocase(ak->user, username)
- && match_wild_nocase(ak->host, vhost)) {
+ if (Anope::Match(username, ak->user, false)
+ && Anope::Match(vhost, ak->host, false)) {
ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton,
ak->expires, ak->reason);
return 1;
@@ -646,8 +646,8 @@ int check_akill(const char *nick, const char *username, const char *host,
}
if (ircd->nickip) {
if (ip) {
- if (match_wild_nocase(ak->user, username)
- && match_wild_nocase(ak->host, ip)) {
+ if (Anope::Match(username, ak->user, false)
+ && Anope::Match(ip, ak->host, false)) {
ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton,
ak->expires, ak->reason);
return 1;
@@ -766,7 +766,7 @@ int add_sgline(User * u, const char *mask, const char *by, time_t expires,
}
}
- if (match_wild_nocase(entry->mask, mask)
+ if (Anope::Match(mask, entry->mask, false )
&& (entry->expires >= expires || entry->expires == 0)) {
if (u)
notice_lang(s_OperServ, u, OPER_SGLINE_ALREADY_COVERED,
@@ -774,7 +774,7 @@ int add_sgline(User * u, const char *mask, const char *by, time_t expires,
return -1;
}
- if (match_wild_nocase(mask, entry->mask)
+ if (Anope::Match(entry->mask, mask, false)
&& (entry->expires <= expires || expires == 0)) {
slist_delete(&sglines, i);
deleted++;
@@ -812,7 +812,7 @@ int add_sgline(User * u, const char *mask, const char *by, time_t expires,
while (u2) {
next = nextuser();
if (!is_oper(u2)) {
- if (match_wild_nocase(entry->mask, u2->realname)) {
+ if (Anope::Match(u2->realname, entry->mask, false)) {
kill_user(ServerName, u2->nick, buf);
}
}
@@ -837,7 +837,7 @@ int check_sgline(const char *nick, const char *realname)
if (!sx)
continue;
- if (match_wild_nocase(sx->mask, realname)) {
+ if (Anope::Match(realname, sx->mask, false)) {
ircdproto->SendSGLine(sx->mask, sx->reason);
/* We kill nick since s_sgline can't */
ircdproto->SendSVSKill(ServerName, nick, "G-Lined: %s", sx->reason);
@@ -953,7 +953,7 @@ int add_sqline(User * u, const char *mask, const char *by, time_t expires,
}
}
- if (match_wild_nocase(entry->mask, mask)
+ if (Anope::Match(mask, entry->mask, false)
&& (entry->expires >= expires || entry->expires == 0)) {
if (u)
notice_lang(s_OperServ, u, OPER_SQLINE_ALREADY_COVERED,
@@ -961,7 +961,7 @@ int add_sqline(User * u, const char *mask, const char *by, time_t expires,
return -1;
}
- if (match_wild_nocase(mask, entry->mask)
+ if (Anope::Match(entry->mask, mask, false)
&& (entry->expires <= expires || expires == 0)) {
slist_delete(&sqlines, i);
deleted++;
@@ -999,7 +999,7 @@ int add_sqline(User * u, const char *mask, const char *by, time_t expires,
while (u2) {
next = nextuser();
if (!is_oper(u2)) {
- if (match_wild_nocase(entry->mask, u2->nick)) {
+ if (Anope::Match(u2->nick, entry->mask, false)) {
kill_user(ServerName, u2->nick, buf);
}
}
@@ -1031,7 +1031,7 @@ int check_sqline(const char *nick, int nick_change)
continue;
}
- if (match_wild_nocase(sx->mask, nick)) {
+ if (Anope::Match(nick, sx->mask, false)) {
sqline(sx->mask, sx->reason);
/* We kill nick since s_sqline can't */
snprintf(reason, sizeof(reason), "Q-Lined: %s", sx->reason);
@@ -1059,7 +1059,7 @@ int check_chan_sqline(const char *chan)
if (*sx->mask != '#')
continue;
- if (match_wild_nocase(sx->mask, chan)) {
+ if (Anope::Match(chan, sx->mask, false)) {
sqline(sx->mask, sx->reason);
return 1;
}
@@ -1167,14 +1167,14 @@ int add_szline(User * u, const char *mask, const char *by, time_t expires,
}
}
- if (match_wild_nocase(entry->mask, mask)) {
+ if (Anope::Match(mask, entry->mask, false)) {
if (u)
notice_lang(s_OperServ, u, OPER_SZLINE_ALREADY_COVERED,
mask, entry->mask);
return -1;
}
- if (match_wild_nocase(mask, entry->mask)) {
+ if (Anope::Match(entry->mask, mask, false)) {
slist_delete(&szlines, i);
deleted++;
}
@@ -1227,7 +1227,7 @@ int check_szline(const char *nick, char *ip)
continue;
}
- if (match_wild_nocase(sx->mask, ip)) {
+ if (Anope::Match(ip, sx->mask, false)) {
ircdproto->SendSZLine(sx->mask, sx->reason, sx->by);
return 1;
}