# HG changeset patch # User Matthew Wild # Date 1275560390 -3600 # Node ID 9fe6d314fd07a7b71f98f1fd06b3f4975372f746 # Parent fe9c4daee076f2911d39d2082e7778f687d1c11b mod_blocking: Only count rules with action == "deny" as blocked JIDs diff -r fe9c4daee076 -r 9fe6d314fd07 mod_blocking/mod_blocking.lua --- 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