Changeset

6328:93fb28851d9e

mod_muc: Fix use of undefined global. Fixes #431.
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 Aug 2014 09:16:29 +0100
parents 6327:5a63f489dcc6
children 6329:6b3eb1611587
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Thu Jul 31 07:14:54 2014 +0100
+++ b/plugins/muc/mod_muc.lua	Tue Aug 05 09:16:29 2014 +0100
@@ -148,7 +148,8 @@
 	if restrict_room_creation then
 		local host_suffix = module.host:gsub("^[^%.]+%.", "");
 		module:hook("muc-room-pre-create", function(event)
-			local user_jid = event.stanza.attr.from;
+			local origin, stanza = event.origin, event.stanza;
+			local user_jid = stanza.attr.from;
 			if not is_admin(user_jid) and not (
 				restrict_room_creation == "local" and
 				select(2, jid_split(user_jid)) == host_suffix