mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 09:06:20 +00:00
Override account options with connect options
With this feature user can configure TLS policy for an account and override it for a single login with /connect command. Example: /account set <jid> tls force /connect <jid> tls trust The example shows how to trust server's certificate only once. Fixes #1021.
This commit is contained in:
@@ -241,3 +241,20 @@ account_free(ProfAccount *account)
|
||||
g_list_free_full(account->otr_always, g_free);
|
||||
free(account);
|
||||
}
|
||||
|
||||
void account_set_server(ProfAccount *account, const char *server)
|
||||
{
|
||||
free(account->server);
|
||||
account->server = strdup(server);
|
||||
}
|
||||
|
||||
void account_set_port(ProfAccount *account, int port)
|
||||
{
|
||||
account->port = port;
|
||||
}
|
||||
|
||||
void account_set_tls_policy(ProfAccount *account, const char *tls_policy)
|
||||
{
|
||||
free(account->tls_policy);
|
||||
account->tls_policy = strdup(tls_policy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user