From c8e0bc8d4f48f950bd0ecd3786f9be85b3b1ab17 Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Wed, 8 Jan 2025 02:39:35 +0100 Subject: [PATCH 1/2] Fix got353() check for capability userhost-in-names not only available but also enabled --- src/mod/irc.mod/chan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/irc.mod/chan.c b/src/mod/irc.mod/chan.c index 7e57ffcfa..96e00fab9 100644 --- a/src/mod/irc.mod/chan.c +++ b/src/mod/irc.mod/chan.c @@ -1258,12 +1258,13 @@ static int gotchghost(char *from, char *msg) { */ static int got353(char *from, char *msg) { + struct capability *current; char prefixchars[64]; char *nameptr, *chname, *uhost, *nick, *p, *host = NULL; struct chanset_t *chan = NULL; int i; - if (find_capability("userhost-in-names")) { + if ((current = find_capability("userhost-in-names")) && (current->enabled)) { strlcpy(prefixchars, isupport_get_prefixchars(), sizeof prefixchars); newsplit(&msg); newsplit(&msg); /* Get rid of =, @, or * symbol */ From 62526fee77464ea06c8186c421469ddb945e149d Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Mon, 20 Jan 2025 22:18:21 +0100 Subject: [PATCH 2/2] Update src/mod/irc.mod/chan.c :) Co-authored-by: Thomas Sader --- src/mod/irc.mod/chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/irc.mod/chan.c b/src/mod/irc.mod/chan.c index 96e00fab9..65c4f3036 100644 --- a/src/mod/irc.mod/chan.c +++ b/src/mod/irc.mod/chan.c @@ -1264,7 +1264,7 @@ static int got353(char *from, char *msg) struct chanset_t *chan = NULL; int i; - if ((current = find_capability("userhost-in-names")) && (current->enabled)) { + if ((current = find_capability("userhost-in-names")) && current->enabled) { strlcpy(prefixchars, isupport_get_prefixchars(), sizeof prefixchars); newsplit(&msg); newsplit(&msg); /* Get rid of =, @, or * symbol */