diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-07-13 15:47:08 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-07-13 15:47:08 +0100 |
commit | af3f281a246020851c57df60ab61b6a9ef2a82b9 (patch) | |
tree | a5cc2940ac88d722a500026be4508b7f427146ce /plugins | |
parent | 995815c6d323a41f44cc6bd2fa76fa9c248c105a (diff) | |
download | prosody-af3f281a246020851c57df60ab61b6a9ef2a82b9.tar.gz prosody-af3f281a246020851c57df60ab61b6a9ef2a82b9.zip |
MUC: Add sections in room config form
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/hidden.lib.lua | 4 | ||||
-rw-r--r-- | plugins/muc/history.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/language.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/members_only.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/mod_muc.lua | 2 | ||||
-rw-r--r-- | plugins/muc/moderated.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/password.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/persistent.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/subject.lib.lua | 2 | ||||
-rw-r--r-- | plugins/muc/whois.lib.lua | 2 |
10 files changed, 12 insertions, 10 deletions
diff --git a/plugins/muc/hidden.lib.lua b/plugins/muc/hidden.lib.lua index 943b0b96..acb8c0fc 100644 --- a/plugins/muc/hidden.lib.lua +++ b/plugins/muc/hidden.lib.lua @@ -22,11 +22,11 @@ module:hook("muc-config-form", function(event) table.insert(event.form, { name = "muc#roomconfig_publicroom"; type = "boolean"; - label = "Include room in public lists"; + label = "Include room information in public lists"; desc = "Enable this to allow people to find the room"; value = not get_hidden(event.room); }); -end, 100-5); +end, 100-9); module:hook("muc-config-submitted/muc#roomconfig_publicroom", function(event) if set_hidden(event.room, not event.value) then diff --git a/plugins/muc/history.lib.lua b/plugins/muc/history.lib.lua index 36b1b260..8a1163cf 100644 --- a/plugins/muc/history.lib.lua +++ b/plugins/muc/history.lib.lua @@ -59,7 +59,7 @@ module:hook("muc-config-form", function(event) desc = "Specify the number of previous messages sent to new users when they join the room"; value = tostring(get_defaulthistorymessages(event.room)) }); -end, 100-10); +end, 70-5); module:hook("muc-config-submitted/muc#roomconfig_historylength", function(event) if set_historylength(event.room, event.value) then diff --git a/plugins/muc/language.lib.lua b/plugins/muc/language.lib.lua index 1c4731d7..ee80806b 100644 --- a/plugins/muc/language.lib.lua +++ b/plugins/muc/language.lib.lua @@ -37,7 +37,7 @@ local function add_form_option(event) end module:hook("muc-disco#info", add_disco_form); -module:hook("muc-config-form", add_form_option, 100-9.5); +module:hook("muc-config-form", add_form_option, 100-3); module:hook("muc-config-submitted/muc#roomconfig_lang", function(event) if set_language(event.room, event.value) then diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua index b3bcdd8b..cd9f777e 100644 --- a/plugins/muc/members_only.lib.lua +++ b/plugins/muc/members_only.lib.lua @@ -85,7 +85,7 @@ module:hook("muc-config-form", function(event) label = "Allow members to invite new members"; value = get_allow_member_invites(event.room); }); -end, 100-6); +end, 90-3); module:hook("muc-config-submitted/muc#roomconfig_membersonly", function(event) if set_members_only(event.room, event.value) then diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 5d9842bc..49bb12d1 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -85,6 +85,8 @@ local st = require "util.stanza"; local cache = require "util.cache"; local um_is_admin = require "core.usermanager".is_admin; +module:require "muc/config_form_sections"; + module:depends("disco"); module:add_identity("conference", "text", module:get_option_string("name", "Prosody Chatrooms")); module:add_feature("http://jabber.org/protocol/muc"); diff --git a/plugins/muc/moderated.lib.lua b/plugins/muc/moderated.lib.lua index 1087e2c4..64ddb542 100644 --- a/plugins/muc/moderated.lib.lua +++ b/plugins/muc/moderated.lib.lua @@ -30,7 +30,7 @@ module:hook("muc-config-form", function(event) desc = "In moderated rooms occupants must be given permission to speak by a room moderator"; value = get_moderated(event.room); }); -end, 100-4); +end, 80-3); module:hook("muc-config-submitted/muc#roomconfig_moderatedroom", function(event) if set_moderated(event.room, event.value) then diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua index fb603d88..36a2ec6f 100644 --- a/plugins/muc/password.lib.lua +++ b/plugins/muc/password.lib.lua @@ -31,7 +31,7 @@ module:hook("muc-config-form", function(event) label = "Password"; value = get_password(event.room) or ""; }); -end, 100-7); +end, 90-2); module:hook("muc-config-submitted/muc#roomconfig_roomsecret", function(event) if set_password(event.room, event.value) then diff --git a/plugins/muc/persistent.lib.lua b/plugins/muc/persistent.lib.lua index 0f787759..aa2cdf26 100644 --- a/plugins/muc/persistent.lib.lua +++ b/plugins/muc/persistent.lib.lua @@ -26,7 +26,7 @@ module:hook("muc-config-form", function(event) desc = "Rooms are automatically deleted when they are empty, unless this option is enabled"; value = get_persistent(event.room); }); -end, 100-3); +end, 100-5); module:hook("muc-config-submitted/muc#roomconfig_persistentroom", function(event) if set_persistent(event.room, event.value) then diff --git a/plugins/muc/subject.lib.lua b/plugins/muc/subject.lib.lua index 3b4efaf7..938abf61 100644 --- a/plugins/muc/subject.lib.lua +++ b/plugins/muc/subject.lib.lua @@ -45,7 +45,7 @@ module:hook("muc-config-form", function(event) desc = "Choose whether anyone, or only moderators, may set the room's subject"; value = get_changesubject(event.room); }); -end, 100-8); +end, 80-1); module:hook("muc-config-submitted/muc#roomconfig_changesubject", function(event) if set_changesubject(event.room, event.value) then diff --git a/plugins/muc/whois.lib.lua b/plugins/muc/whois.lib.lua index ec3114eb..c81ff042 100644 --- a/plugins/muc/whois.lib.lua +++ b/plugins/muc/whois.lib.lua @@ -38,7 +38,7 @@ module:hook("muc-config-form", function(event) { value = 'anyone', label = 'Anyone', default = whois == 'anyone' } } }); -end, 100-9); +end, 80-4); module:hook("muc-config-submitted/muc#roomconfig_whois", function(event) if set_whois(event.room, event.value) then |