aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-03 17:48:41 +0200
committerKim Alvefur <zash@zash.se>2018-08-03 17:48:41 +0200
commit9bc2a2e2ff78ed5a8e6f05009ff0d32f1442e529 (patch)
tree3b9d1d6d5cf093f004b3527c925b2df736476744 /plugins/muc/mod_muc.lua
parent4d70f3f2a9d3495c5be873298a995816fe8467ec (diff)
downloadprosody-9bc2a2e2ff78ed5a8e6f05009ff0d32f1442e529.tar.gz
prosody-9bc2a2e2ff78ed5a8e6f05009ff0d32f1442e529.zip
MUC: Split long lines [luacheck strict]
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r--plugins/muc/mod_muc.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 825dcdcb..58b13936 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -320,9 +320,11 @@ module:hook("muc-room-pre-create", function (event)
room:set_public(module:get_option_boolean("muc_room_default_public", false));
room:set_persistent(module:get_option_boolean("muc_room_default_persistent", room:get_persistent()));
room:set_members_only(module:get_option_boolean("muc_room_default_members_only", room:get_members_only()));
- room:set_allow_member_invites(module:get_option_boolean("muc_room_default_allow_member_invites", room:get_allow_member_invites()));
+ room:set_allow_member_invites(module:get_option_boolean("muc_room_default_allow_member_invites",
+ room:get_allow_member_invites()));
room:set_moderated(module:get_option_boolean("muc_room_default_moderated", room:get_moderated()));
- room:set_whois(module:get_option_boolean("muc_room_default_public_jids", room:get_whois() == "anyone") and "anyone" or "moderators");
+ room:set_whois(module:get_option_boolean("muc_room_default_public_jids",
+ room:get_whois() == "anyone") and "anyone" or "moderators");
room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject()));
room:set_historylength(module:get_option_number("muc_room_default_history_length", room:get_historylength()));
room:set_language(event.stanza.attr["xml:lang"] or module:get_option_string("muc_room_default_language"));
@@ -416,7 +418,8 @@ for event_name, method in pairs {
local room = get_room_from_jid(room_jid);
if room and room._data.destroyed then
- if room._data.locked < os.time() or (is_admin(stanza.attr.from) and stanza.name == "presence" and stanza.attr.type == nil) then
+ if room._data.locked < os.time()
+ or (is_admin(stanza.attr.from) and stanza.name == "presence" and stanza.attr.type == nil) then
-- Allow the room to be recreated by admin or after time has passed
delete_room(room);
room = nil;
@@ -487,7 +490,8 @@ do -- Ad-hoc commands
end
return { status = "completed", info = "The following rooms were destroyed:\n"..t_concat(fields.rooms, "\n") };
end);
- local destroy_rooms_desc = adhoc_new("Destroy Rooms", "http://prosody.im/protocol/muc#destroy", destroy_rooms_handler, "admin");
+ local destroy_rooms_desc = adhoc_new("Destroy Rooms",
+ "http://prosody.im/protocol/muc#destroy", destroy_rooms_handler, "admin");
module:provides("adhoc", destroy_rooms_desc);
end