diff options
author | isundil <isundill@gmail.com> | 2015-10-01 22:36:02 +0200 |
---|---|---|
committer | isundil <isundill@gmail.com> | 2015-10-01 22:36:02 +0200 |
commit | 6ca7dc68478772258dea114d29625dc2c87999f9 (patch) | |
tree | cfa0cab1545d4a429351509ee13c3bd13341df11 /src/fe-common/irc/fe-ircnet.c | |
parent | 2ad6bb12955b3e9bfa43628e6dbfc984537f8b26 (diff) | |
download | irssi-6ca7dc68478772258dea114d29625dc2c87999f9.zip |
Updated server removal
Removing network will also remove attached channels
Diffstat (limited to 'src/fe-common/irc/fe-ircnet.c')
-rw-r--r-- | src/fe-common/irc/fe-ircnet.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c index 1760b966..4d7037d5 100644 --- a/src/fe-common/irc/fe-ircnet.c +++ b/src/fe-common/irc/fe-ircnet.c @@ -29,6 +29,8 @@ #include "irc-servers.h" #include "irc-chatnets.h" #include "printtext.h" +#include "servers-setup.h" +#include "channels-setup.h" static void cmd_network_list(void) { @@ -176,8 +178,6 @@ static void cmd_network_add(const char *data) static void cmd_network_remove(const char *data) { IRC_CHATNET_REC *rec; - GSList *servers; - GSList *tmp; if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS); @@ -185,10 +185,8 @@ static void cmd_network_remove(const char *data) if (rec == NULL) printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_NETWORK_NOT_FOUND, data); else { - servers = server_setup_find_chatnet(data); - - for (tmp = servers; tmp != NULL; tmp = tmp->next) - server_setup_remove((SERVER_SETUP_REC *) tmp->data); + server_setup_remove_chatnet(data); + channel_setup_remove_chatnet(data); printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_NETWORK_REMOVED, data); chatnet_remove(CHATNET(rec)); } |