Do not use (or present to the user) the Address field in fixed mode
fix #3359
This commit is contained in:
@@ -195,7 +195,8 @@ void IrcClient::start()
|
|||||||
# ifdef BOTAN_FOUND
|
# ifdef BOTAN_FOUND
|
||||||
this->credential_manager.set_trusted_fingerprint(options.col<Database::TrustedFingerprint>());
|
this->credential_manager.set_trusted_fingerprint(options.col<Database::TrustedFingerprint>());
|
||||||
# endif
|
# endif
|
||||||
if (!options.col<Database::Address>().empty())
|
if (Config::get("fixed_irc_server", "").empty() &&
|
||||||
|
!options.col<Database::Address>().empty())
|
||||||
address = options.col<Database::Address>();
|
address = options.col<Database::Address>();
|
||||||
#endif
|
#endif
|
||||||
this->bridge.send_xmpp_message(this->hostname, "", "Connecting to " +
|
this->bridge.send_xmpp_message(this->hostname, "", "Connecting to " +
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ void ConfigureIrcServerStep1(XmppComponent&, AdhocSession& session, XmlNode& com
|
|||||||
XmlSubNode instructions(x, "instructions");
|
XmlSubNode instructions(x, "instructions");
|
||||||
instructions.set_inner("Edit the form, to configure the settings of the IRC server " + server_domain);
|
instructions.set_inner("Edit the form, to configure the settings of the IRC server " + server_domain);
|
||||||
|
|
||||||
|
if (Config::get("fixed_irc_server", "").empty())
|
||||||
{
|
{
|
||||||
XmlSubNode field(x, "field");
|
XmlSubNode field(x, "field");
|
||||||
field["var"] = "address";
|
field["var"] = "address";
|
||||||
@@ -409,7 +410,7 @@ void ConfigureIrcServerStep2(XmppComponent&, AdhocSession& session, XmlNode& com
|
|||||||
const XmlNode* value = field->get_child("value", "jabber:x:data");
|
const XmlNode* value = field->get_child("value", "jabber:x:data");
|
||||||
const std::vector<const XmlNode*> values = field->get_children("value", "jabber:x:data");
|
const std::vector<const XmlNode*> values = field->get_children("value", "jabber:x:data");
|
||||||
|
|
||||||
if (field->get_tag("var") == "address" && value)
|
if (field->get_tag("var") == "address" && value && Config::get("fixed_irc_server", "").empty())
|
||||||
options.col<Database::Address>() = value->get_inner();
|
options.col<Database::Address>() = value->get_inner();
|
||||||
|
|
||||||
if (field->get_tag("var") == "ports")
|
if (field->get_tag("var") == "ports")
|
||||||
|
|||||||
Reference in New Issue
Block a user