Mercurial > prosody-hg
comparison core/sessionmanager.lua @ 1226:3b5f9dac2045
sessionmanager: Removed a redundant check
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 29 May 2009 23:23:56 +0500 |
| parents | 1e01a913baf5 |
| children | c253905a8a55 |
comparison
equal
deleted
inserted
replaced
| 1225:1e01a913baf5 | 1226:3b5f9dac2045 |
|---|---|
| 64 session:dispatch_stanza(pres); | 64 session:dispatch_stanza(pres); |
| 65 end | 65 end |
| 66 | 66 |
| 67 -- Remove session/resource from user's session list | 67 -- Remove session/resource from user's session list |
| 68 if session.full_jid then | 68 if session.full_jid then |
| 69 if session.resource then | 69 hosts[session.host].sessions[session.username].sessions[session.resource] = nil; |
| 70 hosts[session.host].sessions[session.username].sessions[session.resource] = nil; | 70 full_sessions[session.full_jid] = nil; |
| 71 full_sessions[session.full_jid] = nil; | |
| 72 end | |
| 73 | 71 |
| 74 if not next(hosts[session.host].sessions[session.username].sessions) then | 72 if not next(hosts[session.host].sessions[session.username].sessions) then |
| 75 log("debug", "All resources of %s are now offline", session.username); | 73 log("debug", "All resources of %s are now offline", session.username); |
| 76 hosts[session.host].sessions[session.username] = nil; | 74 hosts[session.host].sessions[session.username] = nil; |
| 77 bare_sessions[session.host..'@'..session.username] = nil; | 75 bare_sessions[session.host..'@'..session.username] = nil; |
