diff options
author | louiz’ <louiz@louiz.org> | 2017-01-22 21:31:50 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-01-22 21:31:50 +0100 |
commit | 5d801ddcd025f68d2ec91edf0462091a32c779c1 (patch) | |
tree | 25aa1b7c66ada9a98e3027743c9552492689abf8 /src/xmpp | |
parent | dd129366575f371bcec51b7303bfb273d6edc8a2 (diff) | |
download | biboumi-5d801ddcd025f68d2ec91edf0462091a32c779c1.tar.gz biboumi-5d801ddcd025f68d2ec91edf0462091a32c779c1.tar.bz2 biboumi-5d801ddcd025f68d2ec91edf0462091a32c779c1.tar.xz biboumi-5d801ddcd025f68d2ec91edf0462091a32c779c1.zip |
Add a linger_time configuration option on IRC servers
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/biboumi_adhoc_commands.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp index f6f3cd1..ccb3517 100644 --- a/src/xmpp/biboumi_adhoc_commands.cpp +++ b/src/xmpp/biboumi_adhoc_commands.cpp @@ -329,6 +329,17 @@ void ConfigureIrcServerStep1(XmppComponent&, AdhocSession& session, XmlNode& com encoding_in_value.set_inner(options.encodingIn.value()); } encoding_in.add_child(required); + + XmlSubNode linger_time(x, "field"); + linger_time["var"] = "linger_time"; + linger_time["type"] = "text-single"; + linger_time["desc"] = "The number of seconds to wait before sending a QUIT command, after the last channel on that server has been left."; + linger_time["label"] = "Linger time"; + { + XmlSubNode linger_time_value(linger_time, "value"); + linger_time_value.set_inner(std::to_string(options.lingerTime.value())); + } + encoding_in.add_child(required); } void ConfigureIrcServerStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node) @@ -408,6 +419,10 @@ void ConfigureIrcServerStep2(XmppComponent&, AdhocSession& session, XmlNode& com value && !value->get_inner().empty()) options.encodingIn = value->get_inner(); + else if (field->get_tag("var") == "linger_time" && + value && !value->get_inner().empty()) + options.lingerTime = value->get_inner(); + } options.update(); |