diff options
author | Jari Matilainen <jari.matilainen@gmail.com> | 2016-06-18 18:02:04 +0200 |
---|---|---|
committer | Jari Matilainen <jari.matilainen@gmail.com> | 2016-06-18 18:02:04 +0200 |
commit | 79e30405e6b22b116d9d2c8ac5af0f4a4dfdc9c7 (patch) | |
tree | 30366532b932bab41fe1148984426d688020cf17 /src/fe-common | |
parent | 054a98b0ac9bd7f828cd0878687d53e01a3438da (diff) | |
download | irssi-79e30405e6b22b116d9d2c8ac5af0f4a4dfdc9c7.zip |
Let ADD still work as modify
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-channels.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-server.c | 2 | ||||
-rw-r--r-- | src/fe-common/irc/fe-ircnet.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c index fe8e4807..b79938eb 100644 --- a/src/fe-common/core/fe-channels.c +++ b/src/fe-common/core/fe-channels.c @@ -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); diff --git a/src/fe-common/core/fe-server.c b/src/fe-common/core/fe-server.c index f3792b47..e0f05980 100644 --- a/src/fe-common/core/fe-server.c +++ b/src/fe-common/core/fe-server.c @@ -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); diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c index 90697bba..6778cb02 100644 --- a/src/fe-common/irc/fe-ircnet.c +++ b/src/fe-common/irc/fe-ircnet.c @@ -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); |