mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Let ADD still work as modify
This commit is contained in:
parent
054a98b0ac
commit
79e30405e6
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user