From 2216c7ecc6889cf3f11dda9a7dec2afa81bffa0d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 4 Sep 2019 17:37:11 +0200 Subject: [PATCH] IRCClient: Make the auto-join on connect feature actually do something --- Applications/IRCClient/IRCClient.cpp | 15 ++++++--------- Applications/IRCClient/IRCClient.h | 1 - 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Applications/IRCClient/IRCClient.cpp b/Applications/IRCClient/IRCClient.cpp index f0442a726e..e2de9f88bd 100644 --- a/Applications/IRCClient/IRCClient.cpp +++ b/Applications/IRCClient/IRCClient.cpp @@ -62,15 +62,12 @@ void IRCClient::on_socket_connected() send_user(); send_nick(); - if (on_connect) { - auto channel_str = m_config->read_entry("Connection", "AutoJoinChannels", "#test"); - dbgprintf("IRCClient: Channels to autojoin: %s\n", channel_str.characters()); - auto channels = channel_str.split(','); - for (auto& channel : channels) { - join_channel(channel); - dbgprintf("IRCClient: Auto joining channel: %s\n", channel.characters()); - } - on_connect(); + auto channel_str = m_config->read_entry("Connection", "AutoJoinChannels", "#test"); + dbgprintf("IRCClient: Channels to autojoin: %s\n", channel_str.characters()); + auto channels = channel_str.split(','); + for (auto& channel : channels) { + join_channel(channel); + dbgprintf("IRCClient: Auto joining channel: %s\n", channel.characters()); } } diff --git a/Applications/IRCClient/IRCClient.h b/Applications/IRCClient/IRCClient.h index 820229e71d..3c464485d7 100644 --- a/Applications/IRCClient/IRCClient.h +++ b/Applications/IRCClient/IRCClient.h @@ -40,7 +40,6 @@ public: IRCWindow* current_window() { return aid_get_active_window(); } const IRCWindow* current_window() const { return aid_get_active_window(); } - Function on_connect; Function on_disconnect; Function on_server_message; Function on_nickname_changed;