From e413ffe9b3b8961142f9db6e0858c8fef4db10da Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 25 Jul 2024 08:00:00 +0800 Subject: InspIRCd v4: Fix erroneous protocol_specific[INSPIRCD3_PROTOCOL] Commit 86344230a6 fixed some memory leaks in the InspIRCd v3 protocol, and the changes were also ported to the InspIRCd v4 protocol, which erroneously introduced users[n]->protocol_specific[INSPIRCD3_PROTOCOL] into inspircd4.c. Although there are no functional differences, this causes the build to fail when users only enable INSPIRCD4_PROTOCOL in their build options. --- protocols/inspircd4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/inspircd4.c b/protocols/inspircd4.c index 39107d5..ad1f1ae 100644 --- a/protocols/inspircd4.c +++ b/protocols/inspircd4.c @@ -1699,7 +1699,7 @@ int inspircd4_protocol_handle_fjoin(struct string source, size_t argc, struct st uid.len = (size_t)(&(argv[arg_i].data[i]) - uid.data); users[n] = get_table_index(user_list, uid); - if (!users[n] || !users[n]->protocol_specific[INSPIRCD3_PROTOCOL]) // TODO: Check that it's coming the right way too + if (!users[n] || !users[n]->protocol_specific[INSPIRCD4_PROTOCOL]) // TODO: Check that it's coming the right way too user_count--; i++; @@ -1710,7 +1710,7 @@ int inspircd4_protocol_handle_fjoin(struct string source, size_t argc, struct st while (i < argv[arg_i].len && argv[arg_i].data[i] != ' ') i++; - if (!users[n] || !users[n]->protocol_specific[INSPIRCD3_PROTOCOL]) { + if (!users[n] || !users[n]->protocol_specific[INSPIRCD4_PROTOCOL]) { n--; continue; } -- cgit v1.2.3