Comparison

plugins/muc/mod_muc.lua @ 8977:f4030a506d6b

mod_muc: Add support for muc_room_default_allow_member_invites
author Matthew Wild <mwild1@gmail.com>
date Fri, 06 Jul 2018 15:58:11 +0100
parent 8976:92f0876b9230
child 9007:695904638cfa
comparison
equal deleted inserted replaced
8976:92f0876b9230 8977:f4030a506d6b
291 module:hook("muc-room-pre-create", function (event) 291 module:hook("muc-room-pre-create", function (event)
292 local room = event.room; 292 local room = event.room;
293 room:set_public(module:get_option_boolean("muc_room_default_public", false)); 293 room:set_public(module:get_option_boolean("muc_room_default_public", false));
294 room:set_persistent(module:get_option_boolean("muc_room_default_persistent", room:get_persistent())); 294 room:set_persistent(module:get_option_boolean("muc_room_default_persistent", room:get_persistent()));
295 room:set_members_only(module:get_option_boolean("muc_room_default_members_only", room:get_members_only())); 295 room:set_members_only(module:get_option_boolean("muc_room_default_members_only", room:get_members_only()));
296 room:set_allow_member_invites(module:get_option_boolean("muc_room_default_allow_member_invites", room:get_allow_member_invites()));
296 room:set_moderated(module:get_option_boolean("muc_room_default_moderated", room:get_moderated())); 297 room:set_moderated(module:get_option_boolean("muc_room_default_moderated", room:get_moderated()));
297 room:set_whois(module:get_option_boolean("muc_room_default_public_jids", room:get_whois() == "anyone") and "anyone" or "moderators"); 298 room:set_whois(module:get_option_boolean("muc_room_default_public_jids", room:get_whois() == "anyone") and "anyone" or "moderators");
298 room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject())); 299 room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject()));
299 room:set_historylength(module:get_option_number("muc_room_default_history_length", room:get_historylength())); 300 room:set_historylength(module:get_option_number("muc_room_default_history_length", room:get_historylength()));
300 room:set_language(event.stanza.attr["xml:lang"] or module:get_option_string("muc_room_default_language")); 301 room:set_language(event.stanza.attr["xml:lang"] or module:get_option_string("muc_room_default_language"));