Comparison

plugins/mod_privacy.lua @ 3301:772fb30b28fb

Merge 0.7->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 29 Jun 2010 20:17:21 +0100
parent 3221:01da55cffcfb
parent 3300:b651f8290e27
child 3314:4019ad5c61e2
comparison
equal deleted inserted replaced
3294:89dd67cc3689 3301:772fb30b28fb
299 299
300 function checkIfNeedToBeBlocked(e, session) 300 function checkIfNeedToBeBlocked(e, session)
301 local origin, stanza = e.origin, e.stanza; 301 local origin, stanza = e.origin, e.stanza;
302 local privacy_lists = datamanager.load(session.username, session.host, "privacy") or {}; 302 local privacy_lists = datamanager.load(session.username, session.host, "privacy") or {};
303 local bare_jid = session.username.."@"..session.host; 303 local bare_jid = session.username.."@"..session.host;
304 local to = stanza.attr.to; 304 local to = stanza.attr.to or bare_jid;
305 local from = stanza.attr.from; 305 local from = stanza.attr.from;
306 306
307 local is_to_user = bare_jid == jid_bare(to); 307 local is_to_user = bare_jid == jid_bare(to);
308 local is_from_user = bare_jid == jid_bare(from); 308 local is_from_user = bare_jid == jid_bare(from);
309 309