summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorJari Matilainen <jari.matilainen@gmail.com>2016-06-18 18:02:04 +0200
committerJari Matilainen <jari.matilainen@gmail.com>2016-06-18 18:02:04 +0200
commit79e30405e6b22b116d9d2c8ac5af0f4a4dfdc9c7 (patch)
tree30366532b932bab41fe1148984426d688020cf17 /src/fe-common
parent054a98b0ac9bd7f828cd0878687d53e01a3438da (diff)
downloadirssi-79e30405e6b22b116d9d2c8ac5af0f4a4dfdc9c7.zip
Let ADD still work as modify
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/fe-channels.c2
-rw-r--r--src/fe-common/core/fe-server.c2
-rw-r--r--src/fe-common/irc/fe-ircnet.c2
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);