summaryrefslogtreecommitdiff
path: root/src/core/channels-setup.c
diff options
context:
space:
mode:
authorisundil <isundill@gmail.com>2015-10-01 22:36:02 +0200
committerisundil <isundill@gmail.com>2015-10-01 22:36:02 +0200
commit6ca7dc68478772258dea114d29625dc2c87999f9 (patch)
treecfa0cab1545d4a429351509ee13c3bd13341df11 /src/core/channels-setup.c
parent2ad6bb12955b3e9bfa43628e6dbfc984537f8b26 (diff)
downloadirssi-6ca7dc68478772258dea114d29625dc2c87999f9.zip
Updated server removal
Removing network will also remove attached channels
Diffstat (limited to 'src/core/channels-setup.c')
-rw-r--r--src/core/channels-setup.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/channels-setup.c b/src/core/channels-setup.c
index b2d971dd..2902ef8e 100644
--- a/src/core/channels-setup.c
+++ b/src/core/channels-setup.c
@@ -86,6 +86,21 @@ static void channel_setup_destroy(CHANNEL_SETUP_REC *channel)
g_free(channel);
}
+void channel_setup_remove_chatnet(const char *chatnet)
+{
+ GSList *tmp, *next;
+
+ g_return_if_fail(chatnet != NULL);
+
+ for (tmp = setupchannels; tmp != NULL; tmp = next) {
+ CHANNEL_SETUP_REC *rec = tmp->data;
+
+ next = tmp->next;
+ if (g_ascii_strcasecmp(rec->chatnet, chatnet) == 0)
+ channel_setup_remove(rec);
+ }
+}
+
void channel_setup_remove(CHANNEL_SETUP_REC *channel)
{
channel_config_remove(channel);