1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Let ADD still work as modify

This commit is contained in:
Jari Matilainen 2016-06-18 18:02:04 +02:00
parent 054a98b0ac
commit 79e30405e6
3 changed files with 3 additions and 3 deletions

View File

@ -285,7 +285,7 @@ static void cmd_channel_add_modify(const char *data, gboolean add)
rec = CHAT_PROTOCOL(chatnetrec)->create_channel_setup();
rec->name = g_strdup(channel);
rec->chatnet = g_strdup(chatnet);
} else if (!add) {
} else {
if (g_hash_table_lookup(optlist, "bots")) g_free_and_null(rec->botmasks);
if (g_hash_table_lookup(optlist, "botcmd")) g_free_and_null(rec->autosendcmd);
if (*password != '\0') g_free_and_null(rec->password);

View File

@ -138,7 +138,7 @@ static void cmd_server_add_modify(const char *data, gboolean add)
}
rec->address = g_strdup(addr);
rec->port = port;
} else if (!add) {
} else {
value = g_hash_table_lookup(optlist, "port");
if (value != NULL && *value != '\0') rec->port = atoi(value);

View File

@ -112,7 +112,7 @@ static void cmd_network_add_modify(const char *data, gboolean add)
rec = g_new0(IRC_CHATNET_REC, 1);
rec->name = g_strdup(name);
} else if (!add) {
} else {
if (g_hash_table_lookup(optlist, "nick")) g_free_and_null(rec->nick);
if (g_hash_table_lookup(optlist, "user")) g_free_and_null(rec->username);
if (g_hash_table_lookup(optlist, "realname")) g_free_and_null(rec->realname);