From 04368a22ef17c788d0a734b594f206a3c25f82fc Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 16 Sep 2014 13:02:21 -0400 Subject: plugins/muc/muc.lib: Allow plugins to reject broadcasts in the muc-broadcast-message event. --- plugins/muc/muc.lib.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 3dd21303..6bcb28b1 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -164,8 +164,11 @@ function room_mt:build_item_list(occupant, x, is_anonymous, nick, actor, reason) 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. -- cgit v1.2.3