diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-10-12 16:47:27 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-10-12 16:47:27 +0200 |
commit | 84aafab6040f8fd126e6c4941631d44f122c4b9a (patch) | |
tree | e2fbeac7dff1d33b76dec40cf6f91244455bc792 /src/irc | |
parent | 6512f830fa2baa85a7c688843ebd42eb528e2ad6 (diff) | |
download | biboumi-84aafab6040f8fd126e6c4941631d44f122c4b9a.tar.gz biboumi-84aafab6040f8fd126e6c4941631d44f122c4b9a.tar.bz2 biboumi-84aafab6040f8fd126e6c4941631d44f122c4b9a.tar.xz biboumi-84aafab6040f8fd126e6c4941631d44f122c4b9a.zip |
Provide the “realname_customization” option
ref #3136
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc_client.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 4692eef..d6c7021 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -6,6 +6,7 @@ #include <irc/irc_user.hpp> #include <logger/logger.hpp> +#include <config/config.hpp> #include <utils/tolower.hpp> #include <utils/split.hpp> @@ -120,11 +121,14 @@ void IrcClient::on_connected() this->send_nick_command(this->username); #ifdef USE_DATABASE - if (!options.username.value().empty()) - this->username = options.username.value(); - if (!options.realname.value().empty()) - this->realname = options.realname.value(); - this->send_user_command(username, realname); + if (Config::get("realname_customization", "true") == "true") + { + if (!options.username.value().empty()) + this->username = options.username.value(); + if (!options.realname.value().empty()) + this->realname = options.realname.value(); + this->send_user_command(username, realname); + } #endif this->send_user_command(this->username, this->realname); |