From 189015afb4632bd1dc78c1bd87bed1ca4cc48b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 29 Jul 2020 00:37:24 +0200 Subject: Conditionally compile the SASL code only with botan and database --- src/xmpp/biboumi_adhoc_commands.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/xmpp') 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()); } } -#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().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().empty()) { XmlSubNode value(field, "value"); - value.set_inner(options.col()); + value.set_inner(options.col()); } } +#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().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().empty()) { XmlSubNode value(field, "value"); - value.set_inner(options.col()); + value.set_inner(options.col()); } } @@ -486,18 +487,17 @@ void ConfigureIrcServerStep2(XmppComponent& xmpp_component, AdhocSession& sessio } else if (field->get_tag("var") == "fingerprint" && value) - { - options.col() = value->get_inner(); - } + options.col() = value->get_inner(); + + else if (field->get_tag("var") == "sasl_password" && value) + options.col() = value->get_inner(); + #endif // BOTAN_FOUND else if (field->get_tag("var") == "nick" && value) options.col() = value->get_inner(); - else if (field->get_tag("var") == "sasl_password" && value) - options.col() = value->get_inner(); - else if (field->get_tag("var") == "pass" && value) options.col() = value->get_inner(); -- cgit v1.2.3