Comparison

plugins/mod_pep.lua @ 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
parent 1440:d3117a6ad1bf
child 1457:4723bd466a54
comparison
equal deleted inserted replaced
1448:700ea94e1769 1451:cc0aa9470775
52 end 52 end
53 local function publish_all(user, recipient, session) 53 local function publish_all(user, recipient, session)
54 local d = data[user]; 54 local d = data[user];
55 local notify = recipients[user] and recipients[user][recipient]; 55 local notify = recipients[user] and recipients[user][recipient];
56 if d and notify then 56 if d and notify then
57 for node, message in pairs(notify) do 57 for node in pairs(notify) do
58 if d[node] then 58 local message = d[node];
59 if message then
59 message.attr.to = recipient; 60 message.attr.to = recipient;
60 session.send(message); 61 session.send(message);
61 end 62 end
62 end 63 end
63 end 64 end