summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2017-10-30 17:41:16 +0100
committerLemonBoy <thatlemon@gmail.com>2018-01-07 12:36:21 +0100
commitfed791ed9100552edbe643d8b3d0e0bc271e88d4 (patch)
tree2e15e930c339efe66a4caf67f18af2fb7b709c9b /src/irc
parent4b9fcbc15ae3561c34944e30e24fd1d54346bb99 (diff)
downloadirssi-fed791ed9100552edbe643d8b3d0e0bc271e88d4.zip
Fix a problem with multiline responses
Do not clear the whole table every time a response is received.
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-cap.c8
-rw-r--r--src/irc/core/irc-servers.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c
index 880a15b6..90bffd80 100644
--- a/src/irc/core/irc-cap.c
+++ b/src/irc/core/irc-cap.c
@@ -148,8 +148,12 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
caps_length = g_strv_length(caps);
if (!g_ascii_strcasecmp(evt, "LS")) {
- /* Throw away everything and start from scratch */
- g_hash_table_remove_all(server->cap_supported);
+ if (!server->cap_in_multiline) {
+ /* Throw away everything and start from scratch */
+ g_hash_table_remove_all(server->cap_supported);
+ }
+
+ server->cap_in_multiline = multiline;
/* Create a list of the supported caps */
for (i = 0; i < caps_length; i++) {
diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h
index 6c6002c8..1374e846 100644
--- a/src/irc/core/irc-servers.h
+++ b/src/irc/core/irc-servers.h
@@ -68,6 +68,7 @@ struct _IRC_SERVER_REC {
unsigned int motd_got:1; /* We've received MOTD */
unsigned int isupport_sent:1; /* Server has sent us an isupport reply */
unsigned int cap_complete:1; /* We've done the initial CAP negotiation */
+ unsigned int cap_in_multiline:1; /* We're waiting for the multiline response to end */
unsigned int sasl_success:1; /* Did we authenticate successfully ? */
int max_kicks_in_cmd; /* max. number of people to kick with one /KICK command */