mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
remove stuff from isupport always before inserting.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3225 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b538b3bfe8
commit
f2e9b8b395
@ -614,6 +614,9 @@ static void event_isupport(IRC_SERVER_REC *server, const char *data)
|
|||||||
for(item = isupport; *item != NULL; item++) {
|
for(item = isupport; *item != NULL; item++) {
|
||||||
int removed = FALSE;
|
int removed = FALSE;
|
||||||
|
|
||||||
|
if (**item == '\0')
|
||||||
|
continue;
|
||||||
|
|
||||||
if (**item == ':')
|
if (**item == ':')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -634,9 +637,8 @@ static void event_isupport(IRC_SERVER_REC *server, const char *data)
|
|||||||
&key, &value) && removed)
|
&key, &value) && removed)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (removed)
|
|
||||||
g_hash_table_remove(server->isupport, eptr);
|
g_hash_table_remove(server->isupport, eptr);
|
||||||
else {
|
if (!removed) {
|
||||||
g_hash_table_insert(server->isupport, g_strdup(eptr),
|
g_hash_table_insert(server->isupport, g_strdup(eptr),
|
||||||
g_strdup(sptr != NULL ? sptr : ""));
|
g_strdup(sptr != NULL ? sptr : ""));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user