mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +00:00
IRCClient: Make the auto-join on connect feature actually do something
This commit is contained in:
parent
0b1981ddae
commit
2216c7ecc6
2 changed files with 6 additions and 10 deletions
|
@ -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");
|
||||||
auto channel_str = m_config->read_entry("Connection", "AutoJoinChannels", "#test");
|
dbgprintf("IRCClient: Channels to autojoin: %s\n", channel_str.characters());
|
||||||
dbgprintf("IRCClient: Channels to autojoin: %s\n", channel_str.characters());
|
auto channels = channel_str.split(',');
|
||||||
auto channels = channel_str.split(',');
|
for (auto& channel : channels) {
|
||||||
for (auto& channel : channels) {
|
join_channel(channel);
|
||||||
join_channel(channel);
|
dbgprintf("IRCClient: Auto joining channel: %s\n", channel.characters());
|
||||||
dbgprintf("IRCClient: Auto joining channel: %s\n", channel.characters());
|
|
||||||
}
|
|
||||||
on_connect();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue