# HG changeset patch # User Matthew Wild # Date 1224779650 -3600 # Node ID 6b6b8f4ab7e3715c95790cc99c76e25afc77b0c9 # Parent 7fee6b63abca40d31dc98590f9da160a05118862 even faster checking for other sessions... thank you waqas :) diff -r 7fee6b63abca -r 6b6b8f4ab7e3 core/sessionmanager.lua --- 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