Mercurial > prosody-modules
comparison 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 |
comparison
equal
deleted
inserted
replaced
4280:278f2998ce49 | 4281:3c80e46e26f2 |
---|---|
188 | 188 |
189 module:hook("muc-occupant-joined", function(event) | 189 module:hook("muc-occupant-joined", function(event) |
190 local room_jid, user_jid = event.room.jid, event.stanza.attr.from; | 190 local room_jid, user_jid = event.room.jid, event.stanza.attr.from; |
191 local ok, err = unsubscribe_room(user_jid, room_jid); | 191 local ok, err = unsubscribe_room(user_jid, room_jid); |
192 if ok then | 192 if ok then |
193 module:log("debug", "Unsubscribed " .. user_jid .. " from " .. room_jid .. " Reason: muc-occupant-joined") | 193 module:log("debug", "Unsubscribed %s to %s Reason: muc-occupant-joined", user_jid, room_jid) |
194 end | 194 end |
195 end); | 195 end); |
196 | 196 |
197 module:hook("muc-occupant-left", function(event) | 197 module:hook("muc-occupant-left", function(event) |
198 local room_jid, user_jid = event.room.jid, event.stanza.attr.from; | 198 local room_jid, user_jid = event.room.jid, event.stanza.attr.from; |
199 local ok, err = subscribe_room(user_jid, room_jid); | 199 local ok, err = subscribe_room(user_jid, room_jid); |
200 if ok then | 200 if ok then |
201 module:log("debug", "Subscribed " .. user_jid .. " to " .. room_jid .. " Reason: muc-occupant-left") | 201 module:log("debug", "Subscribed %s to %s Reason: muc-occupant-left", user_jid, room_jid) |
202 end | 202 end |
203 end); | 203 end); |
204 | 204 |
205 module:hook("presence/host", function (event) | 205 module:hook("presence/host", function (event) |
206 local origin, stanza = event.origin, event.stanza; | 206 local origin, stanza = event.origin, event.stanza; |