tginfo/certfp ENCAP: Specify the minimum number of parameters instead of checking parc.
This commit is contained in:
parent
9120d0efb0
commit
bb73e588bc
2 changed files with 2 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue