diff plugins/mod_pep.lua @ 1487:66f18c18befa

Merge with main branch.
author Tobias Markmann <tm@ayena.de>
date Sun, 05 Jul 2009 19:05:25 +0200
parents 51f0202b0868
children 569d58d21612
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Sun Jul 05 19:05:03 2009 +0200
+++ b/plugins/mod_pep.lua	Sun Jul 05 19:05:25 2009 +0200
@@ -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
@@ -101,7 +102,7 @@
 			recipients[user] = recipients[user] or {};
 			if hash_map[hash] then
 				recipients[user][recipient] = hash_map[hash];
-				publish_all(user, recipient);
+				publish_all(user, recipient, origin);
 			else
 				recipients[user][recipient] = hash;
 				origin.send(
@@ -192,7 +193,7 @@
 			local notify = {};
 			for _, feature in pairs(disco.tags) do
 				if feature.name == "feature" and feature.attr.var then
-					local nfeature = feature.attr.var:match("^(.*)+notify$");
+					local nfeature = feature.attr.var:match("^(.*)%+notify$");
 					if nfeature then notify[nfeature] = true; end
 				end
 			end