extensions/extb_ssl.c: clean up this logic

This should also be using strcmp(3), not irccmp().
No practical consequence (yet), it just makes more sense.
This commit is contained in:
Aaron Jones 2020-01-28 20:35:16 +00:00
parent 905508885b
commit 5572f43834
No known key found for this signature in database
GPG key ID: 50C25BA590AE7AB4

View file

@ -36,13 +36,17 @@ static int eb_ssl(const char *data, struct Client *client_p,
(void)chptr;
(void)mode_type;
if (! IsSSLClient(client_p))
return EXTBAN_NOMATCH;
if (data != NULL)
{
if (EmptyString(client_p->certfp))
return EXTBAN_NOMATCH;
return !irccmp(data, client_p->certfp) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
if (strcmp(data, client_p->certfp) != 0)
return EXTBAN_NOMATCH;
}
return IsSSLClient(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
return EXTBAN_MATCH;
}