Changeset

1451:cc0aa9470775

mod_pep: Fixed boolean indexing error while casting all messages for a user
author Waqas Hussain <waqas20@gmail.com>
date Thu, 02 Jul 2009 00:43:32 +0500
parents 1448:700ea94e1769
children 1452:0ae8787e4e7d
files plugins/mod_pep.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Mon Jun 29 14:13:49 2009 +0100
+++ b/plugins/mod_pep.lua	Thu Jul 02 00:43:32 2009 +0500
@@ -54,8 +54,9 @@
 	local d = data[user];
 	local notify = recipients[user] and recipients[user][recipient];
 	if d and notify then
-		for node, message in pairs(notify) do
-			if d[node] then
+		for node in pairs(notify) do
+			local message = d[node];
+			if message then
 				message.attr.to = recipient;
 				session.send(message);
 			end