jcs
/subtext
/amendments
/470
session: Use max_sysop_idle_minutes for idling out sysop sessions
jcs made amendment 470 about 1 year ago
--- session.c Fri Apr 7 14:42:41 2023
+++ session.c Sat Apr 8 22:53:49 2023
@@ -756,9 +756,17 @@ bool
session_idled_out(struct session *session)
{
if (session->logged_in) {
- if (Time - session->last_input_at >
- (db->config.max_idle_minutes * 60))
- return true;
+ if (session->user && session->user->is_sysop) {
+ if (db->config.max_sysop_idle_minutes != 0 &&
+ Time - session->last_input_at >
+ (db->config.max_sysop_idle_minutes * 60))
+ return true;
+ } else {
+ if (db->config.max_idle_minutes != 0 &&
+ Time - session->last_input_at >
+ (db->config.max_idle_minutes * 60))
+ return true;
+ }
} else {
if (Time - session->established_at >
db->config.max_login_seconds)