Changeset

5984:c68e2b11d691

MUC: Expose room metatable on module
author Kim Alvefur <zash@zash.se>
date Sat, 18 Jan 2014 18:28:50 +0100
parents 5983:930109558aa2
children 5985:98ed9fe368ac
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Sat Jan 18 18:11:13 2014 +0100
+++ b/plugins/muc/mod_muc.lua	Sat Jan 18 18:28:50 2014 +0100
@@ -52,8 +52,9 @@
 	return um_is_admin(jid, module.host);
 end
 
-local _set_affiliation = muc_new_room.room_mt.set_affiliation;
-local _get_affiliation = muc_new_room.room_mt.get_affiliation;
+room_mt = muclib.room_mt; -- Yes, global.
+local _set_affiliation = room_mt.set_affiliation;
+local _get_affiliation = room_mt.get_affiliation;
 function muclib.room_mt:get_affiliation(jid)
 	if is_admin(jid) then return "owner"; end
 	return _get_affiliation(self, jid);