degesch: add "autoconnect" option for servers
This commit is contained in:
parent
8ed93ae03e
commit
4865f91eb0
|
@ -1538,6 +1538,10 @@ static struct config_schema g_config_server[] =
|
|||
.comment = "OpenSSL CA bundle path",
|
||||
.type = CONFIG_ITEM_STRING },
|
||||
|
||||
{ .name = "autoconnect",
|
||||
.comment = "Connect automatically on startup",
|
||||
.type = CONFIG_ITEM_BOOLEAN,
|
||||
.default_ = "on" },
|
||||
{ .name = "autojoin",
|
||||
.comment = "Channels to join on start",
|
||||
.type = CONFIG_ITEM_STRING_ARRAY,
|
||||
|
@ -6451,8 +6455,8 @@ server_add (struct app_context *ctx,
|
|||
config_schema_apply_to_object (g_config_server, subtree, s);
|
||||
config_schema_call_changed (subtree);
|
||||
|
||||
if (get_config_boolean (s->config, "autoconnect"))
|
||||
// Connect to the server ASAP
|
||||
// TODO: make this configurable ("autoconnect")
|
||||
poller_timer_set (&s->reconnect_tmr, 0);
|
||||
return s;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue