Diff

plugins/muc/muc.lib.lua @ 5519:06e188268df1

MUC: add __tostring on room metatable
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Apr 2013 20:36:55 +0100
parent 5397:ed55a48270be
child 5541:1997671d5e46
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Thu Apr 25 17:50:22 2013 +0200
+++ b/plugins/muc/muc.lib.lua	Thu Apr 25 20:36:55 2013 +0100
@@ -88,6 +88,10 @@
 local room_mt = {};
 room_mt.__index = room_mt;
 
+function room_mt:__tostring()
+	return "MUC room ("..self.jid..")";
+end
+
 function room_mt:get_default_role(affiliation)
 	if affiliation == "owner" or affiliation == "admin" then
 		return "moderator";