comparison mod_c2s_limit_sessions/mod_c2s_limit_sessions.lua @ 6510:317fb60e8cad

mod_c2s_limit_sessions: Tweak error message
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Apr 2026 17:45:32 +0100
parents f581210093a7
children fe8738747d91
comparison
equal deleted inserted replaced
6509:f61564e11d3b 6510:317fb60e8cad
6 6
7 local sessions = hosts[module.host].sessions; 7 local sessions = hosts[module.host].sessions;
8 module:hook("resource-bind", function(event) 8 module:hook("resource-bind", function(event)
9 local session = event.session; 9 local session = event.session;
10 if count(next, sessions[session.username].sessions) > max_resources then 10 if count(next, sessions[session.username].sessions) > max_resources then
11 session:close{ condition = "policy-violation", text = "Too many resources" }; 11 session:close{ condition = "policy-violation", text = "Too many active connections to this account" };
12 return false 12 return false
13 end 13 end
14 end, -1); 14 end, -1);