Comparison

plugins/muc/mod_muc.lua @ 13229:bb7177efbf41

plugins: Use boolean config method in some places Because it makes sense and improves feedback via logging
author Kim Alvefur <zash@zash.se>
date Tue, 18 Jul 2023 12:38:16 +0200
parent 13226:ac44bb7b7064
child 13233:37d67b5f9768
comparison
equal deleted inserted replaced
13228:616c578c644f 13229:bb7177efbf41
280 280
281 local function set_room_defaults(room, lang) 281 local function set_room_defaults(room, lang)
282 room:set_public(module:get_option_boolean("muc_room_default_public", false)); 282 room:set_public(module:get_option_boolean("muc_room_default_public", false));
283 room:set_persistent(module:get_option_boolean("muc_room_default_persistent", room:get_persistent())); 283 room:set_persistent(module:get_option_boolean("muc_room_default_persistent", room:get_persistent()));
284 room:set_members_only(module:get_option_boolean("muc_room_default_members_only", room:get_members_only())); 284 room:set_members_only(module:get_option_boolean("muc_room_default_members_only", room:get_members_only()));
285 room:set_allow_member_invites(module:get_option_boolean("muc_room_default_allow_member_invites", 285 room:set_allow_member_invites(module:get_option_boolean("muc_room_default_allow_member_invites", room:get_allow_member_invites()));
286 room:get_allow_member_invites()));
287 room:set_moderated(module:get_option_boolean("muc_room_default_moderated", room:get_moderated())); 286 room:set_moderated(module:get_option_boolean("muc_room_default_moderated", room:get_moderated()));
288 room:set_whois(module:get_option_boolean("muc_room_default_public_jids", 287 room:set_whois(module:get_option_boolean("muc_room_default_public_jids", room:get_whois() == "anyone") and "anyone" or "moderators");
289 room:get_whois() == "anyone") and "anyone" or "moderators");
290 room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject())); 288 room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject()));
291 room:set_historylength(module:get_option_integer("muc_room_default_history_length", room:get_historylength(), 0)); 289 room:set_historylength(module:get_option_integer("muc_room_default_history_length", room:get_historylength(), 0));
292 room:set_language(lang or module:get_option_string("muc_room_default_language")); 290 room:set_language(lang or module:get_option_string("muc_room_default_language"));
293 room:set_presence_broadcast(module:get_option_enum("muc_room_default_presence_broadcast", room:get_presence_broadcast(), "visitor", "participant", 291 room:set_presence_broadcast(module:get_option_enum("muc_room_default_presence_broadcast", room:get_presence_broadcast(), "visitor", "participant",
294 "moderator")); 292 "moderator"));