Diff

plugins/muc/mod_muc.lua @ 5984:c68e2b11d691

MUC: Expose room metatable on module
author Kim Alvefur <zash@zash.se>
date Sat, 18 Jan 2014 18:28:50 +0100
parent 5945:51ead0aa3a02
child 6000:0f6399c86c10
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);