even faster checking for other sessions... thank you waqas :)

vault/s2s
Matthew Wild 18 years ago
parent 9e6c3919af
commit 3286f0609f
  1. 7
      core/sessionmanager.lua

@ -39,12 +39,7 @@ function destroy_session(session)
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

Loading…
Cancel
Save