tginfo/certfp ENCAP: Specify the minimum number of parameters instead of checking parc.

This commit is contained in:
Keith Buck 2012-03-25 17:04:21 +00:00
parent 9120d0efb0
commit bb73e588bc
2 changed files with 2 additions and 6 deletions

View file

@ -42,7 +42,7 @@ static int me_certfp(struct Client *, struct Client *, int, const char **);
struct Message certfp_msgtab = {
"CERTFP", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_ignore, mg_ignore, mg_ignore, {me_certfp, 0}, mg_ignore}
{mg_unreg, mg_ignore, mg_ignore, mg_ignore, {me_certfp, 2}, mg_ignore}
};
mapi_clist_av1 certfp_clist[] = { &certfp_msgtab, NULL };
@ -58,8 +58,6 @@ me_certfp(struct Client *client_p, struct Client *source_p, int parc, const char
{
if (!IsPerson(source_p))
return 0;
if (parc != 2)
return 0;
rb_free(source_p->certfp);
source_p->certfp = NULL;

View file

@ -43,7 +43,7 @@ static int me_tginfo(struct Client *, struct Client *, int, const char **);
struct Message tginfo_msgtab = {
"TGINFO", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_ignore, mg_ignore, mg_ignore, {me_tginfo, 0}, mg_ignore}
{mg_unreg, mg_ignore, mg_ignore, mg_ignore, {me_tginfo, 2}, mg_ignore}
};
mapi_clist_av1 tginfo_clist[] = { &tginfo_msgtab, NULL };
@ -59,8 +59,6 @@ me_tginfo(struct Client *client_p, struct Client *source_p, int parc, const char
{
if (!IsPerson(source_p))
return 0;
if (parc != 2)
return 0;
int remaining = atoi(parv[1]);
if (remaining != 0)