summary refs log tree commit diff stats
path: root/src/common/proto-irc.c
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2019-11-24 13:01:48 -0800
committerPatrick Griffis <tingping@tingping.se>2019-11-24 13:01:48 -0800
commit7d9f3acfc905ca5d0c9747699eb21d2d95fbf821 (patch)
tree448c43e0eaca1252cc9cf15a0a7c667d4ca1d9fd /src/common/proto-irc.c
parentad5be08a0703659e1b90ec4a5c6ff58a42660bae (diff)
Fix capability negotiation ending before sasl finishes with multi-line cap
Closes #2398
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r--src/common/proto-irc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 497cb6ca..59a60a8f 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -957,6 +957,7 @@ process_numeric (session * sess, int n,
 		EMIT_SIGNAL_TIMESTAMP (XP_TE_SASLRESPONSE, serv->server_session, word[1],
 									  word[2], word[3], ++word_eol[4], 0,
 									  tags_data->timestamp);
+		serv->waiting_on_sasl = FALSE;
 		if (!serv->sent_capend)
 		{
 			serv->sent_capend = TRUE;
@@ -1330,7 +1331,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 				}
 				else if (strncasecmp (word[4], "NAK", 3) == 0)
 				{
-					inbound_cap_nak (serv, tags_data);
+					inbound_cap_nak (serv, word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5], tags_data);
 				}
 				else if (strncasecmp (word[4], "LIST", 4) == 0)	
 				{