Software /
code /
prosody
Changeset
7401:e16b3fd0bd80
MUC: Assign priorities to config form hooks so they have a consistent order on each start
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Apr 2016 20:31:39 +0200 |
parents | 7400:f1ff321178d4 |
children | 7402:ef7ea3bad7a1 |
files | plugins/muc/affiliation_notify.lib.lua plugins/muc/description.lib.lua plugins/muc/hidden.lib.lua plugins/muc/history.lib.lua plugins/muc/members_only.lib.lua plugins/muc/moderated.lib.lua plugins/muc/name.lib.lua plugins/muc/password.lib.lua plugins/muc/persistent.lib.lua plugins/muc/subject.lib.lua plugins/muc/whois.lib.lua |
diffstat | 11 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/affiliation_notify.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/affiliation_notify.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -34,7 +34,7 @@ label = "Notify users when their affiliation changes when they are not in the room?"; value = get_affiliation_notify(event.room); }); -end); +end, 100-11); module:hook("muc-config-submitted/muc#roomconfig_affiliationnotify", function(event) if set_affiliation_notify(event.room, event.value) then
--- a/plugins/muc/description.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/description.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -27,7 +27,7 @@ }); end module:hook("muc-disco#info", add_form_option); -module:hook("muc-config-form", add_form_option); +module:hook("muc-config-form", add_form_option, 100-2); module:hook("muc-config-submitted/muc#roomconfig_roomdesc", function(event) if set_description(event.room, event.value) then
--- a/plugins/muc/hidden.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/hidden.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -25,7 +25,7 @@ label = "Make Room Publicly Searchable?"; value = not get_hidden(event.room); }); -end); +end, 100-5); module:hook("muc-config-submitted/muc#roomconfig_publicroom", function(event) if set_hidden(event.room, not event.value) then
--- a/plugins/muc/history.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/history.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -38,7 +38,7 @@ label = "Maximum Number of History Messages Returned by Room"; value = tostring(get_historylength(event.room)); }); -end); +end, 100-10); module:hook("muc-config-submitted/muc#roomconfig_historylength", function(event) if set_historylength(event.room, event.value) then
--- a/plugins/muc/members_only.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/members_only.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -58,7 +58,7 @@ label = "Make Room Members-Only?"; value = get_members_only(event.room); }); -end); +end, 100-6); module:hook("muc-config-submitted/muc#roomconfig_membersonly", function(event) if set_members_only(event.room, event.value) then
--- a/plugins/muc/moderated.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/moderated.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -29,7 +29,7 @@ label = "Make Room Moderated?"; value = get_moderated(event.room); }); -end); +end, 100-4); module:hook("muc-config-submitted/muc#roomconfig_moderatedroom", function(event) if set_moderated(event.room, event.value) then
--- a/plugins/muc/name.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/name.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -31,7 +31,7 @@ label = "Name"; value = get_name(event.room) or ""; }); -end); +end, 100-1); module:hook("muc-config-submitted/muc#roomconfig_roomname", function(event) if set_name(event.room, event.value) then
--- a/plugins/muc/password.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/password.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -31,7 +31,7 @@ label = "Password"; value = get_password(event.room) or ""; }); -end); +end, 100-7); module:hook("muc-config-submitted/muc#roomconfig_roomsecret", function(event) if set_password(event.room, event.value) then
--- a/plugins/muc/persistent.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/persistent.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -25,7 +25,7 @@ label = "Make Room Persistent?"; value = get_persistent(event.room); }); -end); +end, 100-3); module:hook("muc-config-submitted/muc#roomconfig_persistentroom", function(event) if set_persistent(event.room, event.value) then
--- a/plugins/muc/subject.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/subject.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -35,7 +35,7 @@ label = "Allow Occupants to Change Subject?"; value = get_changesubject(event.room); }); -end); +end, 100-8); module:hook("muc-config-submitted/muc#roomconfig_changesubject", function(event) if set_changesubject(event.room, event.value) then
--- a/plugins/muc/whois.lib.lua Tue Apr 19 19:00:46 2016 +0200 +++ b/plugins/muc/whois.lib.lua Tue Apr 19 20:31:39 2016 +0200 @@ -38,7 +38,7 @@ { value = 'anyone', label = 'Anyone', default = whois == 'anyone' } } }); -end); +end, 100-9); module:hook("muc-config-submitted/muc#roomconfig_whois", function(event) if set_whois(event.room, event.value) then