Changeset

9610:ca000dcd4c06

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 07 Nov 2018 21:53:40 +0100
parents 9607:2a42b72468ca (current diff) 9609:1dfcea523200 (diff)
children 9614:7d1dbacda48a
files
diffstat 3 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_register.lua	Thu Nov 01 23:58:41 2018 +0100
+++ b/plugins/mod_register.lua	Wed Nov 07 21:53:40 2018 +0100
@@ -11,7 +11,6 @@
 
 if allow_registration then
 	module:depends("register_ibr");
-	module:depends("register_limits");
 end
 
 module:depends("user_account_management");
--- a/plugins/mod_register_ibr.lua	Thu Nov 01 23:58:41 2018 +0100
+++ b/plugins/mod_register_ibr.lua	Wed Nov 07 21:53:40 2018 +0100
@@ -18,6 +18,10 @@
 local require_encryption = module:get_option_boolean("c2s_require_encryption",
 	module:get_option_boolean("require_encryption", false));
 
+pcall(function ()
+	module:depends("register_limits");
+end);
+
 local account_details = module:open_store("account_details");
 
 local field_map = {
--- a/plugins/mod_storage_memory.lua	Thu Nov 01 23:58:41 2018 +0100
+++ b/plugins/mod_storage_memory.lua	Wed Nov 07 21:53:40 2018 +0100
@@ -197,6 +197,12 @@
 	return nil, "unsupported-store";
 end
 
+function driver:purge(user) -- luacheck: ignore 212/self
+	for _, store in pairs(memory) do
+		store[user] = nil;
+	end
+end
+
 if auto_purge_enabled then
 	module:hook("resource-unbind", function (event)
 		local user_bare_jid = event.session.username.."@"..event.session.host;