degesch: add "autoconnect" option for servers

This commit is contained in:
Přemysl Eric Janouch 2015-07-11 06:16:53 +02:00
parent 8ed93ae03e
commit 4865f91eb0
1 changed files with 7 additions and 3 deletions

View File

@ -1538,6 +1538,10 @@ static struct config_schema g_config_server[] =
.comment = "OpenSSL CA bundle path", .comment = "OpenSSL CA bundle path",
.type = CONFIG_ITEM_STRING }, .type = CONFIG_ITEM_STRING },
{ .name = "autoconnect",
.comment = "Connect automatically on startup",
.type = CONFIG_ITEM_BOOLEAN,
.default_ = "on" },
{ .name = "autojoin", { .name = "autojoin",
.comment = "Channels to join on start", .comment = "Channels to join on start",
.type = CONFIG_ITEM_STRING_ARRAY, .type = CONFIG_ITEM_STRING_ARRAY,
@ -6451,9 +6455,9 @@ server_add (struct app_context *ctx,
config_schema_apply_to_object (g_config_server, subtree, s); config_schema_apply_to_object (g_config_server, subtree, s);
config_schema_call_changed (subtree); config_schema_call_changed (subtree);
// Connect to the server ASAP if (get_config_boolean (s->config, "autoconnect"))
// TODO: make this configurable ("autoconnect") // Connect to the server ASAP
poller_timer_set (&s->reconnect_tmr, 0); poller_timer_set (&s->reconnect_tmr, 0);
return s; return s;
} }