mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 22:06:22 +00:00
Add sessions_alarm
Introduce new feature: sessions_alarm. Added new account setting: max_connections. On exceeding this number, user will get an alert. If number is less than 1, no alert will happen. Tests altered to fit new feature.
This commit is contained in:
@@ -57,7 +57,7 @@ account_new(gchar* name, gchar* jid, gchar* password, gchar* eval_password, gboo
|
||||
gchar* omemo_policy, GList* omemo_enabled, GList* omemo_disabled,
|
||||
GList* ox_enabled, GList* pgp_enabled, gchar* pgp_keyid,
|
||||
gchar* startscript, gchar* theme, gchar* tls_policy, gchar* auth_policy,
|
||||
gchar* client)
|
||||
gchar* client, int max_sessions)
|
||||
{
|
||||
ProfAccount* new_account = calloc(1, sizeof(ProfAccount));
|
||||
|
||||
@@ -140,6 +140,8 @@ account_new(gchar* name, gchar* jid, gchar* password, gchar* eval_password, gboo
|
||||
|
||||
new_account->auth_policy = auth_policy;
|
||||
|
||||
new_account->max_sessions = max_sessions;
|
||||
|
||||
return new_account;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user