Software /
code /
prosody-modules
Diff
mod_privacy/mod_privacy.lua @ 41:0381d5d38c37
mod_privacy: fix bug where priority was nil and compared to a number (Thx flo for reporting!)
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Thu, 15 Oct 2009 09:41:13 +0200 |
parent | 39:b84b2b026eb4 |
child | 42:bbb3d3a90a70 |
line wrap: on
line diff
--- a/mod_privacy/mod_privacy.lua Wed Oct 14 00:52:58 2009 +0200 +++ b/mod_privacy/mod_privacy.lua Thu Oct 15 09:41:13 2009 +0200 @@ -353,7 +353,7 @@ module:log("debug", "Never block communications from one of a user's resources to another."); return; -- from one of a user's resource to another => HANDS OFF! end - + local idx; local list; local item; @@ -465,7 +465,7 @@ local session_; if bare_sessions[node.."@"..host] ~= nil then for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do - if session_.priority > prio then + if session_.priority ~= nil and session_.priority > prio then session = session_; prio = session_.priority; end