summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-07-19 18:58:29 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-07-19 18:58:29 +0000
commit57ddd84f076ae1ee0f5dea25542f23fec22447e9 (patch)
treeec7e5d1743cceeca277e89144ce190520358367d
parentbd4c1907846b95b95e7d89da42f65bb2b2064057 (diff)
- m_xline.c, m_resv.c: fixed bug where the mask which is to be banned is checked in
both valid_wild_card_simple() and valid_wild_card() git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@4276 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--modules/m_resv.c2
-rw-r--r--modules/m_xline.c19
2 files changed, 9 insertions, 12 deletions
diff --git a/modules/m_resv.c b/modules/m_resv.c
index e40ea5c..ef12f86 100644
--- a/modules/m_resv.c
+++ b/modules/m_resv.c
@@ -60,7 +60,7 @@ mo_resv(struct Client *client_p, struct Client *source_p,
/* RESV #channel ON irc.server.com :abuse
* RESV kiddie ON irc.server.com :abuse
*/
- if (parse_aline("RESV", source_p, parc, parv, AWILD, &resv, NULL,
+ if (parse_aline("RESV", source_p, parc, parv, 0, &resv, NULL,
&tkline_time, &target_server, &reason) < 0)
return 0;
diff --git a/modules/m_xline.c b/modules/m_xline.c
index 19fdca6..5afb9c2 100644
--- a/modules/m_xline.c
+++ b/modules/m_xline.c
@@ -111,22 +111,19 @@ remove_xline(struct Client *source_p, const char *gecos)
* side effects - complains to client, when warn != 0
*/
static int
-valid_xline(struct Client *source_p, const char *gecos, const char *reason, int warn)
+valid_xline(struct Client *source_p, const char *gecos, const char *reason)
{
if (EmptyString(reason))
{
- if (warn)
- sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
- me.name, source_p->name, "XLINE");
+ sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+ me.name, source_p->name, "XLINE");
return 0;
}
if (!valid_wild_card_simple(gecos))
{
- if (warn)
- sendto_one(source_p, ":%s NOTICE %s :Please include at least %d non-wildcard characters with the xline",
- me.name, source_p->name, ConfigFileEntry.min_nonwildcard_simple);
-
+ sendto_one(source_p, ":%s NOTICE %s :Please include at least %d non-wildcard characters with the xline",
+ me.name, source_p->name, ConfigFileEntry.min_nonwildcard_simple);
return 0;
}
@@ -245,7 +242,7 @@ mo_xline(struct Client *client_p, struct Client *source_p,
* XLINE <gecos> <time> ON <mask> :<reason>
* XLINE <gecos> ON <mask> :<reason>
*/
- if (parse_aline("XLINE", source_p, parc, parv, AWILD, &gecos, NULL,
+ if (parse_aline("XLINE", source_p, parc, parv, 0, &gecos, NULL,
&tkline_time, &target_server, &reason) < 0)
return 0;
@@ -275,7 +272,7 @@ mo_xline(struct Client *client_p, struct Client *source_p,
"%s 0 :%s", gecos, reason);
}
- if (!valid_xline(source_p, gecos, reason, 0))
+ if (!valid_xline(source_p, gecos, reason))
return 0;
if ((conf = find_matching_name_conf(CONF_XLINE, gecos, NULL, NULL, 0)))
@@ -307,7 +304,7 @@ ms_xline(struct Client *client_p, struct Client *source_p,
if (!IsClient(source_p))
return 0;
- if (!valid_xline(source_p, parv[2], parv[4], 0))
+ if (!valid_xline(source_p, parv[2], parv[4]))
return 0;
relay_xline(source_p, parv);