equal
deleted
inserted
replaced
353 self:publicise_occupant_status(occupant, x); |
353 self:publicise_occupant_status(occupant, x); |
354 if occupant.jid == real_jid then -- Was last session |
354 if occupant.jid == real_jid then -- Was last session |
355 module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;}); |
355 module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;}); |
356 end |
356 end |
357 return true; |
357 return true; |
|
358 end |
|
359 |
|
360 if not module:get_option_boolean("muc_compat_create", true) then |
|
361 module:hook("muc-room-pre-create", function(event) |
|
362 local origin, stanza = event.origin, event.stanza; |
|
363 if not stanza:get_child("x", "http://jabber.org/protocol/muc") then |
|
364 origin.send(st.error_reply(stanza, "cancel", "item-not-found")); |
|
365 return true; |
|
366 end |
|
367 end, -1); |
358 end |
368 end |
359 |
369 |
360 -- Give the room creator owner affiliation |
370 -- Give the room creator owner affiliation |
361 module:hook("muc-room-pre-create", function(event) |
371 module:hook("muc-room-pre-create", function(event) |
362 event.room:set_affiliation(true, jid_bare(event.stanza.attr.from), "owner"); |
372 event.room:set_affiliation(true, jid_bare(event.stanza.attr.from), "owner"); |