# HG changeset patch # User daurnimator # Date 1410886941 14400 # Node ID d782cbb46c2a359fd9e1d616dc6328f875a0aefa # Parent 5fd6c739e9bf67d80a4545dd676ecf7584e790ca plugins/muc/muc.lib: Allow plugins to reject broadcasts in the muc-broadcast-message event. diff -r 5fd6c739e9bf -r d782cbb46c2a plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Tue Sep 16 12:27:05 2014 -0400 +++ b/plugins/muc/muc.lib.lua Tue Sep 16 13:02:21 2014 -0400 @@ -164,8 +164,11 @@ end function room_mt:broadcast_message(stanza) - module:fire_event("muc-broadcast-message", {room = self, stanza = stanza}); + if module:fire_event("muc-broadcast-message", {room = self, stanza = stanza}) then + return true; + end self:broadcast(stanza); + return true; end -- Broadcast a stanza to all occupants in the room.