changeset 177:bcd7dc51a5e3

mod_blocking: Fix to iterate over blocklist correctly when removing a JID
author Matthew Wild <mwild1@gmail.com>
date Mon, 14 Jun 2010 12:26:25 +0100
parents 26bb69a57749
children 62f47a93b5b7
files mod_blocking/mod_blocking.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_blocking/mod_blocking.lua	Mon Jun 14 12:25:53 2010 +0100
+++ b/mod_blocking/mod_blocking.lua	Mon Jun 14 12:26:25 2010 +0100
@@ -71,7 +71,7 @@
 	if not default_list then return; end
 	local items = default_list.items;
 	local item;
-	for i=#items,1 do -- order must be unique
+	for i=#items,1,-1 do -- order must be unique
 		item = items[i];
 		if item.type == "jid" and item.action == "deny" then
 			table.remove(items, i);