From 07cc19ce10dcf1cbbdca4797540d4f2bea74b724 Mon Sep 17 00:00:00 2001 From: John Hernandez <129467592+H3rnand3zzz@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:16:24 +0200 Subject: 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. --- src/command/cmd_defs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/command/cmd_defs.c') diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index fe993e39..0dd7f10a 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2070,6 +2070,7 @@ static const struct cmd_t command_defs[] = { "/account set tls force|allow|trust|legacy|disable", "/account set auth default|legacy", "/account set theme ", + "/account set session_alarm ", "/account clear password", "/account clear eval_password", "/account clear server", @@ -2079,7 +2080,8 @@ static const struct cmd_t command_defs[] = { "/account clear startscript", "/account clear clientid", "/account clear muc", - "/account clear resource") + "/account clear resource", + "/account clear session_alarm") CMD_DESC( "Commands for creating and managing accounts. " "Calling with no arguments will display information for the current account.") @@ -2116,6 +2118,7 @@ static const struct cmd_t command_defs[] = { { "set auth default", "Use default authentication process." }, { "set auth legacy", "Allow legacy authentication." }, { "set theme ", "Set the UI theme for the account." }, + { "set session_alarm ", "Alarm about suspicious activity if sessions count exceeds max_sessions." }, { "clear server", "Remove the server setting for this account." }, { "clear port", "Remove the port setting for this account." }, { "clear password", "Remove the password setting for this account." }, @@ -2126,7 +2129,8 @@ static const struct cmd_t command_defs[] = { { "clear clientid", "Reset client's name to default." }, { "clear theme", "Clear the theme setting for the account, the global theme will be used." }, { "clear resource", "Remove the resource setting for this account." }, - { "clear muc", "Remove the default MUC service setting." }) + { "clear muc", "Remove the default MUC service setting." }, + { "clear session_alarm", "Disable the session alarm." }) CMD_EXAMPLES( "/account add me", "/account set me jid ulfhednar@valhalla.edda", -- cgit 1.4.1-2-gfad0