diff options
author | Timo Sirainen <cras@irssi.org> | 2004-02-07 00:03:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-02-07 00:03:56 +0000 |
commit | f2e9b8b3958937ee34d183c332f3928502d39d10 (patch) | |
tree | 551e3c0756539471336012a4420c538c1d374bc9 /src/irc | |
parent | b538b3bfe8660c64250065fb9a2208f85b299e19 (diff) | |
download | irssi-f2e9b8b3958937ee34d183c332f3928502d39d10.zip |
remove stuff from isupport always before inserting.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3225 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-servers.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 75b95136..235af039 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -614,6 +614,9 @@ static void event_isupport(IRC_SERVER_REC *server, const char *data) for(item = isupport; *item != NULL; item++) { int removed = FALSE; + if (**item == '\0') + continue; + if (**item == ':') break; @@ -634,9 +637,8 @@ static void event_isupport(IRC_SERVER_REC *server, const char *data) &key, &value) && removed) continue; - if (removed) - g_hash_table_remove(server->isupport, eptr); - else { + g_hash_table_remove(server->isupport, eptr); + if (!removed) { g_hash_table_insert(server->isupport, g_strdup(eptr), g_strdup(sptr != NULL ? sptr : "")); } |