Thu, 23 Oct 2008 17:34:10 +0100
even faster checking for other sessions... thank you waqas :)
core/sessionmanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/sessionmanager.lua Thu Oct 23 17:27:41 2008 +0100 +++ b/core/sessionmanager.lua Thu Oct 23 17:34:10 2008 +0100 @@ -39,12 +39,7 @@ if session.resource then hosts[session.host].sessions[session.username].sessions[session.resource] = nil; end - local nomore = true; - for res, ssn in pairs(hosts[session.host].sessions[session.username]) do - nomore = false; - break; - end - if nomore then + if not next(hosts[session.host].sessions[session.username], nil) then hosts[session.host].sessions[session.username] = nil; end end