You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mod_poltergeist_component.lua 592B

123456789101112131415161718192021
  1. local st = require "util.stanza";
  2. -- A component which we use to receive all stanzas for the created poltergeists
  3. -- replays with error if an iq is sent
  4. function no_action()
  5. return true;
  6. end
  7. function error_reply(event)
  8. module:send(st.error_reply(event.stanza, "cancel", "service-unavailable"));
  9. return true;
  10. end
  11. module:hook("presence/host", no_action);
  12. module:hook("message/host", no_action);
  13. module:hook("presence/full", no_action);
  14. module:hook("message/full", no_action);
  15. module:hook("iq/host", error_reply);
  16. module:hook("iq/full", error_reply);
  17. module:hook("iq/bare", error_reply);