From 28bc65a2ded0edc6c89c49c1919b323cc073f74f Mon Sep 17 00:00:00 2001 From: Test_User Date: Tue, 23 Jul 2024 19:15:05 -0400 Subject: Fix InspIRCd v3 PING handler --- protocols/inspircd3.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/protocols/inspircd3.c b/protocols/inspircd3.c index 347b370..bef4a80 100644 --- a/protocols/inspircd3.c +++ b/protocols/inspircd3.c @@ -1261,7 +1261,7 @@ int inspircd3_protocol_handle_ping(struct string source, size_t argc, struct str return -1; } - if (STRING_EQ(config->sid, source) && STRING_EQ(SID, argv[1])) { + if (STRING_EQ(config->sid, source) && STRING_EQ(SID, argv[0])) { struct server_info *server = get_table_index(server_list, config->sid); if (!server->awaiting_pong) { networks[net].send(handle, STRING(":")); @@ -1275,10 +1275,6 @@ int inspircd3_protocol_handle_ping(struct string source, size_t argc, struct str } } - struct server_info *reply = get_table_index(server_list, argv[0]); - if (!reply || !STRING_EQ(reply->next, config->sid)) - return 0; - networks[net].send(handle, STRING(":")); networks[net].send(handle, argv[0]); networks[net].send(handle, STRING(" PONG :")); -- cgit v1.2.3