summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-04 17:37:11 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-04 17:37:11 +0200
commit2216c7ecc6889cf3f11dda9a7dec2afa81bffa0d (patch)
tree9c5efc09c24ded83cbf633564c6624063a2d8bb3 /Applications
parent0b1981ddae777d00fa83fec943b17bd1dafc39db (diff)
downloadserenity-2216c7ecc6889cf3f11dda9a7dec2afa81bffa0d.zip
IRCClient: Make the auto-join on connect feature actually do something
Diffstat (limited to 'Applications')
-rw-r--r--Applications/IRCClient/IRCClient.cpp15
-rw-r--r--Applications/IRCClient/IRCClient.h1
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<void()> on_connect;
Function<void()> on_disconnect;
Function<void()> on_server_message;
Function<void(const String&)> on_nickname_changed;