diff options
author | louiz’ <louiz@louiz.org> | 2018-03-18 02:31:18 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-03-18 02:31:18 +0100 |
commit | 577984faf2befaa7f11a1e4a115dc8d80805fec7 (patch) | |
tree | db65417e4dc37123841309f9c9ee8d375bf9e003 /src/irc | |
parent | ad7aa5b7090f093a8a167a3fcb29c421881946f7 (diff) | |
download | biboumi-577984faf2befaa7f11a1e4a115dc8d80805fec7.tar.gz biboumi-577984faf2befaa7f11a1e4a115dc8d80805fec7.tar.bz2 biboumi-577984faf2befaa7f11a1e4a115dc8d80805fec7.tar.xz biboumi-577984faf2befaa7f11a1e4a115dc8d80805fec7.zip |
Allow the execution of multiple commands after the IRC connection
fix #3275
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc_client.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 764f37b..5f93ea6 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -889,8 +889,9 @@ void IrcClient::on_welcome_message(const IrcMessage& message) #ifdef USE_DATABASE auto options = Database::get_irc_server_options(this->bridge.get_bare_jid(), this->get_hostname()); - if (!options.col<Database::AfterConnectionCommand>().empty()) - this->send_raw(options.col<Database::AfterConnectionCommand>()); + const auto commands = Database::get_after_connection_commands(options); + for (const auto& command: commands) + this->send_raw(command.col<Database::AfterConnectionCommand>()); #endif // Install a repeated events to regularly send a PING TimedEventsManager::instance().add_event(TimedEvent(240s, std::bind(&IrcClient::send_ping_command, this), |