Merge 0.10->trunk

This commit is contained in:
Kim Alvefur 2017-08-28 21:05:12 +02:00
commit 38f73e28ae
13 changed files with 103 additions and 28 deletions

View file

@ -201,6 +201,18 @@ module:hook_global("user-deleted", function(event)
end
end, 200);
module:hook_global("user-password-changed", function(event)
local username, host, resource = event.username, event.host, event.resource;
local user = hosts[host].sessions[username];
if user and user.sessions then
for r, session in pairs(user.sessions) do
if r ~= resource then
session:close{ condition = "reset", text = "Password changed" };
end
end
end
end, 200);
function runner_callbacks:ready()
self.data.conn:resume();
end