summaryrefslogtreecommitdiff
path: root/Applications/IRCClient/IRCClient.cpp
diff options
context:
space:
mode:
authorChristopher Dumas <christopherdumas@gmail.com>2019-05-26 10:14:03 -0700
committerAndreas Kling <awesomekling@gmail.com>2019-05-27 21:40:53 +0200
commitc23882dde1f8a46f82b599ece5bb4b59606d030b (patch)
tree549ca3ad885aab8706ef2ff489f5b5b1558d9a33 /Applications/IRCClient/IRCClient.cpp
parent50154a23cbd51f72eeb199b8b56acfa8d7bb694a (diff)
downloadserenity-c23882dde1f8a46f82b599ece5bb4b59606d030b.zip
can now tile background and made sure the IRC choose server popup still works
Diffstat (limited to 'Applications/IRCClient/IRCClient.cpp')
-rw-r--r--Applications/IRCClient/IRCClient.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Applications/IRCClient/IRCClient.cpp b/Applications/IRCClient/IRCClient.cpp
index 76a3f16535..a4e2cdb165 100644
--- a/Applications/IRCClient/IRCClient.cpp
+++ b/Applications/IRCClient/IRCClient.cpp
@@ -35,7 +35,7 @@ IRCClient::IRCClient()
{
m_socket = new CTCPSocket(this);
m_nickname = m_config->read_entry("User", "Nickname", "seren1ty");
- m_hostname = m_config->read_entry("Connection", "Server", "chat.freenode.net");
+ m_hostname = m_config->read_entry("Connection", "Server", "");
m_port = m_config->read_num_entry("Connection", "Port", 6667);
}
@@ -47,6 +47,9 @@ void IRCClient::set_server(const String &hostname, int port)
{
m_hostname = hostname;
m_port = port;
+ m_config->write_entry("Connection", "Server", hostname);
+ m_config->write_num_entry("Connection", "Port", port);
+ m_config->sync();
}
void IRCClient::on_socket_connected()
@@ -61,7 +64,7 @@ void IRCClient::on_socket_connected()
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) {
+ for (auto& channel : channels) {
join_channel(channel);
dbgprintf("IRCClient: Auto joining channel: %s\n", channel.characters());
}