Software /
code /
prosody
Comparison
plugins/mod_privacy.lua @ 3221:01da55cffcfb
mod_privacy: Workaround for a traceback.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 10 Jun 2010 03:26:01 +0500 |
parent | 3085:cf01b0725272 |
child | 3301:772fb30b28fb |
comparison
equal
deleted
inserted
replaced
3220:b3772f9bc359 | 3221:01da55cffcfb |
---|---|
436 e.stanza.attr.from = session.username .. "@" .. session.host; | 436 e.stanza.attr.from = session.username .. "@" .. session.host; |
437 if session.resource ~= nil then | 437 if session.resource ~= nil then |
438 e.stanza.attr.from = e.stanza.attr.from .. "/" .. session.resource; | 438 e.stanza.attr.from = e.stanza.attr.from .. "/" .. session.resource; |
439 end | 439 end |
440 end | 440 end |
441 return checkIfNeedToBeBlocked(e, session); | 441 if session.username then -- FIXME do properly |
442 return checkIfNeedToBeBlocked(e, session); | |
443 end | |
442 end | 444 end |
443 | 445 |
444 module:hook("pre-message/full", preCheckOutgoing, 500); | 446 module:hook("pre-message/full", preCheckOutgoing, 500); |
445 module:hook("pre-message/bare", preCheckOutgoing, 500); | 447 module:hook("pre-message/bare", preCheckOutgoing, 500); |
446 module:hook("pre-message/host", preCheckOutgoing, 500); | 448 module:hook("pre-message/host", preCheckOutgoing, 500); |