Bläddra i källkod

IRCClient: Make the auto-join on connect feature actually do something

Andreas Kling 5 år sedan
förälder
incheckning
2216c7ecc6
2 ändrade filer med 6 tillägg och 10 borttagningar
  1. 6 9
      Applications/IRCClient/IRCClient.cpp
  2. 0 1
      Applications/IRCClient/IRCClient.h

+ 6 - 9
Applications/IRCClient/IRCClient.cpp

@@ -62,15 +62,12 @@ void IRCClient::on_socket_connected()
     send_user();
     send_user();
     send_nick();
     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());
     }
     }
 }
 }
 
 

+ 0 - 1
Applications/IRCClient/IRCClient.h

@@ -40,7 +40,6 @@ public:
     IRCWindow* current_window() { return aid_get_active_window(); }
     IRCWindow* current_window() { return aid_get_active_window(); }
     const IRCWindow* current_window() const { 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_disconnect;
     Function<void()> on_server_message;
     Function<void()> on_server_message;
     Function<void(const String&)> on_nickname_changed;
     Function<void(const String&)> on_nickname_changed;