diff options
author | louiz’ <louiz@louiz.org> | 2020-07-29 00:37:24 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2020-07-29 00:37:24 +0200 |
commit | 189015afb4632bd1dc78c1bd87bed1ca4cc48b19 (patch) | |
tree | be612c729f087d0cb9e237fb47e3f3c6d3f7e12d /src/xmpp | |
parent | e4550d324feba5d054ded16c89a4628ed84454de (diff) | |
download | biboumi-189015afb4632bd1dc78c1bd87bed1ca4cc48b19.tar.gz biboumi-189015afb4632bd1dc78c1bd87bed1ca4cc48b19.tar.bz2 biboumi-189015afb4632bd1dc78c1bd87bed1ca4cc48b19.tar.xz biboumi-189015afb4632bd1dc78c1bd87bed1ca4cc48b19.zip |
Conditionally compile the SASL code only with botan and database
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/biboumi_adhoc_commands.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp index 99589e0..75ae1cc 100644 --- a/src/xmpp/biboumi_adhoc_commands.cpp +++ b/src/xmpp/biboumi_adhoc_commands.cpp @@ -310,31 +310,32 @@ void ConfigureIrcServerStep1(XmppComponent&, AdhocSession& session, XmlNode& com fingerprint_value.set_inner(options.col<Database::TrustedFingerprint>()); } } -#endif { XmlSubNode field(x, "field"); - field["var"] = "nick"; - field["type"] = "text-single"; - field["label"] = "Nickname"; - set_desc(field, "If set, will override the nickname provided in the initial presence sent to join the first server channel"); - if (!options.col<Database::Nick>().empty()) + field["var"] = "sasl_password"; + field["type"] = "text-private"; + field["label"] = "SASL Password"; + set_desc(field, "Use it to authenticate with your nick."); + if (!options.col<Database::SaslPassword>().empty()) { XmlSubNode value(field, "value"); - value.set_inner(options.col<Database::Nick>()); + value.set_inner(options.col<Database::SaslPassword>()); } } +#endif + { XmlSubNode field(x, "field"); - field["var"] = "sasl_password"; - field["type"] = "text-private"; - field["label"] = "SASL Password"; - set_desc(field, "Use it to authenticate with your nick."); - if (!options.col<Database::SaslPassword>().empty()) + field["var"] = "nick"; + field["type"] = "text-single"; + field["label"] = "Nickname"; + set_desc(field, "If set, will override the nickname provided in the initial presence sent to join the first server channel"); + if (!options.col<Database::Nick>().empty()) { XmlSubNode value(field, "value"); - value.set_inner(options.col<Database::SaslPassword>()); + value.set_inner(options.col<Database::Nick>()); } } @@ -486,18 +487,17 @@ void ConfigureIrcServerStep2(XmppComponent& xmpp_component, AdhocSession& sessio } else if (field->get_tag("var") == "fingerprint" && value) - { - options.col<Database::TrustedFingerprint>() = value->get_inner(); - } + options.col<Database::TrustedFingerprint>() = value->get_inner(); + + else if (field->get_tag("var") == "sasl_password" && value) + options.col<Database::SaslPassword>() = value->get_inner(); + #endif // BOTAN_FOUND else if (field->get_tag("var") == "nick" && value) options.col<Database::Nick>() = value->get_inner(); - else if (field->get_tag("var") == "sasl_password" && value) - options.col<Database::SaslPassword>() = value->get_inner(); - else if (field->get_tag("var") == "pass" && value) options.col<Database::Pass>() = value->get_inner(); |