From 58646bafbb6f54acc23b7edef38b617c30fc7ece Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 14 Jun 2024 14:36:14 +0200 Subject: [PATCH] Reorder some if's and comment them to make sense. [skip ci] --- src/modules/join.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/join.c b/src/modules/join.c index 6ad4dc65d..ac32d05a8 100644 --- a/src/modules/join.c +++ b/src/modules/join.c @@ -506,11 +506,11 @@ void _do_join(Client *client, int parc, const char *parv[]) } channel = make_channel(name); - if (channel && (lp = find_membership_link(client->user->channel, channel))) - continue; - if (!channel) - continue; + continue; /* would be VERY rare, but e.g. for empty chan ('') */ + + if (find_membership_link(client->user->channel, channel)) + continue; /* user already in channel, so JOIN ignored */ i = HOOK_CONTINUE; if (!MyConnect(client))