]> PatchyGit - patchyircd.git/commitdiff
fix whois crash on non-tls users
authorEgor <egor@patchysicp.xyz>
Fri, 27 May 2022 17:46:09 +0000 (20:46 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 27 May 2022 17:46:09 +0000 (20:46 +0300)
irc.c

diff --git a/irc.c b/irc.c
index 8553465..a5e86ff 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -889,7 +889,7 @@ int processPacket(struct client_data *client, char *source, char *command, int a
                if (cl) {
 #ifdef HAS_TLS
                        if (client == cl || client->umode & UMODE_OPER)
-                               if (client->cctx && tls_peer_cert_provided(cl->cctx))
+                               if (cl->cctx && tls_peer_cert_provided(cl->cctx))
                                        rpl_whoiscertfp(client, cl, tls_peer_cert_hash(cl->cctx)), sendbuf(client);
 #endif
                        if (cl->umode & UMODE_REGISTERED && !strcmp(cl->key, cl->username))