Changeset

1614:79adec50b24d

mod_muc_restrict_rooms: Fixed the way of getting room and user
author Nicolás Kovac <nkneumann(at)gmail.com>
date Fri, 20 Feb 2015 22:45:45 +0000
parents 1613:ca04f75958f7
children 1615:d0fd8a29b724
files mod_muc_restrict_rooms/mod_muc_restrict_rooms.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_restrict_rooms/mod_muc_restrict_rooms.lua	Fri Feb 20 21:28:39 2015 +0000
+++ b/mod_muc_restrict_rooms/mod_muc_restrict_rooms.lua	Fri Feb 20 22:45:45 2015 +0000
@@ -44,11 +44,11 @@
         end
 
 	-- Get the room
-	local room = jid.split(stanza.attr.from);
+	local room = jid.split(stanza.attr.to);
         if not room then return; end
 
 	-- Get who has tried to join it
-	local who = jid.bare(stanza.attr.to)
+	local who = jid.bare(stanza.attr.from)
 
 	-- Checking whether room is restricted
 	local check_restricted = is_restricted(room, who)