MUC: Logging - logger doesn't like nils
authorWaqas Hussain <waqas20@gmail.com>
Thu, 19 Feb 2009 14:10:26 +0500
changeset 822 a82eadc415ff
parent 820 c20545c0dc4d
child 823 e0197798f5f3
child 824 b6ee70721783
MUC: Logging - logger doesn't like nils
plugins/mod_muc.lua
--- a/plugins/mod_muc.lua	Thu Feb 19 02:01:31 2009 +0500
+++ b/plugins/mod_muc.lua	Thu Feb 19 14:10:26 2009 +0500
@@ -226,7 +226,7 @@
 	local room = jid_bare(to);
 	local current_nick = jid_nick:get(from, room);
 	local type = stanza.attr.type;
-	log("debug", "room: %s, current_nick: %s, stanza: %s", room, current_nick, stanza:top_tag());
+	log("debug", "room: %s, current_nick: %s, stanza: %s", room or "nil", current_nick or "nil", stanza:top_tag());
 	if stanza.name == "presence" then
 		local pr = get_filtered_presence(stanza);
 		pr.attr.from = to;