1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

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

This commit is contained in:
Andreas Kling 2019-09-04 17:37:11 +02:00
parent 0b1981ddae
commit 2216c7ecc6
2 changed files with 6 additions and 10 deletions

View file

@ -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());
}
}