projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a42c079
)
MUC: Assign priorities to config form hooks so they have a consistent order on each...
author
Kim Alvefur
<zash@zash.se>
Tue, 19 Apr 2016 18:31:39 +0000
(20:31 +0200)
committer
Kim Alvefur
<zash@zash.se>
Tue, 19 Apr 2016 18:31:39 +0000
(20:31 +0200)
plugins/muc/affiliation_notify.lib.lua
patch
|
blob
|
history
plugins/muc/description.lib.lua
patch
|
blob
|
history
plugins/muc/hidden.lib.lua
patch
|
blob
|
history
plugins/muc/history.lib.lua
patch
|
blob
|
history
plugins/muc/members_only.lib.lua
patch
|
blob
|
history
plugins/muc/moderated.lib.lua
patch
|
blob
|
history
plugins/muc/name.lib.lua
patch
|
blob
|
history
plugins/muc/password.lib.lua
patch
|
blob
|
history
plugins/muc/persistent.lib.lua
patch
|
blob
|
history
plugins/muc/subject.lib.lua
patch
|
blob
|
history
plugins/muc/whois.lib.lua
patch
|
blob
|
history
diff --git
a/plugins/muc/affiliation_notify.lib.lua
b/plugins/muc/affiliation_notify.lib.lua
index e708ae94e359ec26119105b2d9885a4ca7def0ad..7403a9ace8d79e7edd3f80917a9491fd4590c861 100644
(file)
--- 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);
});
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
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 44556a46e8ac764cbece1eff1892703b5bb64882..d4bc1a71bf65cbd90cf0031ef689c6424b216fa1 100644
(file)
--- 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);
});
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
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 43521e14953ddcdbf989c9f81873fc5670e6f8ca..b2fe6216f6e0cdca3988604c4108bccea075fc30 100644
(file)
--- 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);
});
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
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 0fc0dfa3dfd5332716461a7e974c50fb060f1b46..437056efed974abb41e7ae60b46fa0d0e60ff3dc 100644
(file)
--- 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));
});
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
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 888e86228d69b01d20eef9b279a6ddb99f0368da..1e5e6a56656500bb37c07011eecd21296adf6627 100644
(file)
--- 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);
});
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
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 2f53ba4c0fb3ed1bdf2aa3a6d31f36fc7c7e9195..8354c5852dec7d2cd4f57d3abab7b39676d7a0c4 100644
(file)
--- 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);
});
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
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 3dbae9db59b59ff361c4f3d75e5fc63cb63ac6f8..2dcb979a244de5cd807e1253c15405e411d5c252 100644
(file)
--- 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 "";
});
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
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 8cb124ea2329dc6fc2fb8a9db44a5c265e22f727..02ecdc1a57b318e625627dbb7703981674801e2e 100644
(file)
--- 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 "";
});
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
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 773509b5d53e536834dc17836fea09afc36bc28f..abceafe1cb784018ef3cc70746aa72adf9d0e916 100644
(file)
--- 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);
});
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
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 832f160b5f2d03d6250d2333558abe318f64111b..6f118b43f1397d1f42aeaca06df76c013d63b599 100644
(file)
--- 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);
});
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
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 07e72c69623fefc66c31fd68f4dfcfd16bd57221..4acf288c3ca27fbdd179495b3de68458c7eb1dcc 100644
(file)
--- 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' }
}
});
{ 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
module:hook("muc-config-submitted/muc#roomconfig_whois", function(event)
if set_whois(event.room, event.value) then