From 4ae1dbbd0086c976599a22eb9083164839d9ad1c Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 13 Aug 2019 15:52:00 +0200 Subject: [PATCH] fix cap queue order --- src/irc/core/irc-cap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c index 21a27324..31b57094 100644 --- a/src/irc/core/irc-cap.c +++ b/src/irc/core/irc-cap.c @@ -184,6 +184,9 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add avail_caps = 0; + /* To process the queue in order, we need to reverse the stack once */ + server->cap_queue = g_slist_reverse(server->cap_queue); + /* Check whether the cap is supported by the server */ for (tmp = server->cap_queue; tmp != NULL; tmp = tmp->next) { if (g_hash_table_lookup_extended(server->cap_supported, tmp->data, NULL, NULL)) {