aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-19 20:31:39 +0200
committerKim Alvefur <zash@zash.se>2016-04-19 20:31:39 +0200
commit27f234ce4e975fb109e439d38a751422ac8c2344 (patch)
tree2b0198ba840b793eb7c5c9d28d51acd7d648a0c3 /plugins/muc
parentb42b0643f07546e85488e7384b960fcdd961db7e (diff)
downloadprosody-27f234ce4e975fb109e439d38a751422ac8c2344.tar.gz
prosody-27f234ce4e975fb109e439d38a751422ac8c2344.zip
MUC: Assign priorities to config form hooks so they have a consistent order on each start
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/affiliation_notify.lib.lua2
-rw-r--r--plugins/muc/description.lib.lua2
-rw-r--r--plugins/muc/hidden.lib.lua2
-rw-r--r--plugins/muc/history.lib.lua2
-rw-r--r--plugins/muc/members_only.lib.lua2
-rw-r--r--plugins/muc/moderated.lib.lua2
-rw-r--r--plugins/muc/name.lib.lua2
-rw-r--r--plugins/muc/password.lib.lua2
-rw-r--r--plugins/muc/persistent.lib.lua2
-rw-r--r--plugins/muc/subject.lib.lua2
-rw-r--r--plugins/muc/whois.lib.lua2
11 files changed, 11 insertions, 11 deletions
diff --git a/plugins/muc/affiliation_notify.lib.lua b/plugins/muc/affiliation_notify.lib.lua
index e708ae94..7403a9ac 100644
--- a/plugins/muc/affiliation_notify.lib.lua
+++ b/plugins/muc/affiliation_notify.lib.lua
@@ -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
diff --git a/plugins/muc/description.lib.lua b/plugins/muc/description.lib.lua
index 44556a46..d4bc1a71 100644
--- a/plugins/muc/description.lib.lua
+++ b/plugins/muc/description.lib.lua
@@ -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
diff --git a/plugins/muc/hidden.lib.lua b/plugins/muc/hidden.lib.lua
index 43521e14..b2fe6216 100644
--- a/plugins/muc/hidden.lib.lua
+++ b/plugins/muc/hidden.lib.lua
@@ -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
diff --git a/plugins/muc/history.lib.lua b/plugins/muc/history.lib.lua
index 0fc0dfa3..437056ef 100644
--- a/plugins/muc/history.lib.lua
+++ b/plugins/muc/history.lib.lua
@@ -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
diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua
index 888e8622..1e5e6a56 100644
--- a/plugins/muc/members_only.lib.lua
+++ b/plugins/muc/members_only.lib.lua
@@ -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
diff --git a/plugins/muc/moderated.lib.lua b/plugins/muc/moderated.lib.lua
index 2f53ba4c..8354c585 100644
--- a/plugins/muc/moderated.lib.lua
+++ b/plugins/muc/moderated.lib.lua
@@ -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
diff --git a/plugins/muc/name.lib.lua b/plugins/muc/name.lib.lua
index 3dbae9db..2dcb979a 100644
--- a/plugins/muc/name.lib.lua
+++ b/plugins/muc/name.lib.lua
@@ -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
diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua
index 8cb124ea..02ecdc1a 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);
+end, 100-7);
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 773509b5..abceafe1 100644
--- a/plugins/muc/persistent.lib.lua
+++ b/plugins/muc/persistent.lib.lua
@@ -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
diff --git a/plugins/muc/subject.lib.lua b/plugins/muc/subject.lib.lua
index 832f160b..6f118b43 100644
--- a/plugins/muc/subject.lib.lua
+++ b/plugins/muc/subject.lib.lua
@@ -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
diff --git a/plugins/muc/whois.lib.lua b/plugins/muc/whois.lib.lua
index 07e72c69..4acf288c 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);
+end, 100-9);
module:hook("muc-config-submitted/muc#roomconfig_whois", function(event)
if set_whois(event.room, event.value) then