diff mod_muc_rai/mod_muc_rai.lua @ 4281:3c80e46e26f2

mod_muc_rai: Use log systems string formatting facilities Weird things happen if you put %s in your JID here.
author Kim Alvefur <zash@zash.se>
date Tue, 01 Dec 2020 22:12:16 +0100
parents 10dc4527574f
children 4a5c4a352b78
line wrap: on
line diff
--- a/mod_muc_rai/mod_muc_rai.lua	Fri Dec 04 16:58:36 2020 +0100
+++ b/mod_muc_rai/mod_muc_rai.lua	Tue Dec 01 22:12:16 2020 +0100
@@ -190,7 +190,7 @@
 	local room_jid, user_jid = event.room.jid, event.stanza.attr.from;
 	local ok, err = unsubscribe_room(user_jid, room_jid);
 	if ok then
-		module:log("debug", "Unsubscribed " .. user_jid .. " from " .. room_jid .. " Reason: muc-occupant-joined")
+		module:log("debug", "Unsubscribed %s to %s Reason: muc-occupant-joined", user_jid, room_jid)
 	end
 end);
 
@@ -198,7 +198,7 @@
 	local room_jid, user_jid = event.room.jid, event.stanza.attr.from;
 	local ok, err = subscribe_room(user_jid, room_jid);
 	if ok then
-		module:log("debug", "Subscribed " .. user_jid .. " to " .. room_jid .. " Reason: muc-occupant-left")
+		module:log("debug", "Subscribed %s to %s Reason: muc-occupant-left", user_jid, room_jid)
 	end
 end);