MUC: Assign priorities to config form hooks so they have a consistent order on each...
authorKim Alvefur <zash@zash.se>
Tue, 19 Apr 2016 18:31:39 +0000 (20:31 +0200)
committerKim Alvefur <zash@zash.se>
Tue, 19 Apr 2016 18:31:39 +0000 (20:31 +0200)
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

index e708ae94e359ec26119105b2d9885a4ca7def0ad..7403a9ace8d79e7edd3f80917a9491fd4590c861 100644 (file)
@@ -34,7 +34,7 @@ module:hook("muc-config-form", function(event)
                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
index 44556a46e8ac764cbece1eff1892703b5bb64882..d4bc1a71bf65cbd90cf0031ef689c6424b216fa1 100644 (file)
@@ -27,7 +27,7 @@ local function add_form_option(event)
        });
 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
index 43521e14953ddcdbf989c9f81873fc5670e6f8ca..b2fe6216f6e0cdca3988604c4108bccea075fc30 100644 (file)
@@ -25,7 +25,7 @@ module:hook("muc-config-form", function(event)
                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
index 0fc0dfa3dfd5332716461a7e974c50fb060f1b46..437056efed974abb41e7ae60b46fa0d0e60ff3dc 100644 (file)
@@ -38,7 +38,7 @@ module:hook("muc-config-form", function(event)
                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
index 888e86228d69b01d20eef9b279a6ddb99f0368da..1e5e6a56656500bb37c07011eecd21296adf6627 100644 (file)
@@ -58,7 +58,7 @@ module:hook("muc-config-form", function(event)
                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
index 2f53ba4c0fb3ed1bdf2aa3a6d31f36fc7c7e9195..8354c5852dec7d2cd4f57d3abab7b39676d7a0c4 100644 (file)
@@ -29,7 +29,7 @@ module:hook("muc-config-form", function(event)
                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
index 3dbae9db59b59ff361c4f3d75e5fc63cb63ac6f8..2dcb979a244de5cd807e1253c15405e411d5c252 100644 (file)
@@ -31,7 +31,7 @@ module:hook("muc-config-form", function(event)
                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
index 8cb124ea2329dc6fc2fb8a9db44a5c265e22f727..02ecdc1a57b318e625627dbb7703981674801e2e 100644 (file)
@@ -31,7 +31,7 @@ module:hook("muc-config-form", function(event)
                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
index 773509b5d53e536834dc17836fea09afc36bc28f..abceafe1cb784018ef3cc70746aa72adf9d0e916 100644 (file)
@@ -25,7 +25,7 @@ module:hook("muc-config-form", function(event)
                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
index 832f160b5f2d03d6250d2333558abe318f64111b..6f118b43f1397d1f42aeaca06df76c013d63b599 100644 (file)
@@ -35,7 +35,7 @@ module:hook("muc-config-form", function(event)
                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
index 07e72c69623fefc66c31fd68f4dfcfd16bd57221..4acf288c3ca27fbdd179495b3de68458c7eb1dcc 100644 (file)
@@ -38,7 +38,7 @@ module:hook("muc-config-form", function(event)
                        { 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