Mercurial > prosody-modules
diff mod_blocking/mod_blocking.lua @ 163:9fe6d314fd07
mod_blocking: Only count rules with action == "deny" as blocked JIDs
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 03 Jun 2010 11:19:50 +0100 |
parents | fda7faee7677 |
children | 0b238b2b0801 |
line wrap: on
line diff
--- a/mod_blocking/mod_blocking.lua Thu Jun 03 03:02:33 2010 +0100 +++ b/mod_blocking/mod_blocking.lua Thu Jun 03 11:19:50 2010 +0100 @@ -41,7 +41,7 @@ local item; for i=1,#items do -- order must be unique item = items[i]; - if item.type == "jid" and item.value == jid then + if item.type == "jid" and item.action == "deny" and item.value == jid then table.remove(items, i); return true; end @@ -60,7 +60,7 @@ local jid_list = {}; for i=1,#items do -- order must be unique item = items[i]; - if item.type == "jid" then + if item.type == "jid" and item.action == "deny" then jid_list[#jid_list+1] = item.value; end end