Skip to content

Instantly share code, notes, and snippets.

@zeen
Created February 18, 2010 11:35
Show Gist options
  • Save zeen/307588 to your computer and use it in GitHub Desktop.
Save zeen/307588 to your computer and use it in GitHub Desktop.
local host = hosts[module.host];
module:hook("presence/full", function(event)
local origin, stanza = event.origin, event.stanza;
local node, host, resource = jid_split(stanza.attr.to);
if not node then return; end -- not to a room
local room = host.muc[node.."@"..host];
if not room then
origin.send(st.error_reply(stanza, "auth", "not-allowed"));
end
end);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment