Changeset

11848:b4d4f0339e16

mod_mimicking: Correctly hook the *global* user-deleted event
author Kim Alvefur <zash@zash.se>
date Tue, 12 Oct 2021 17:55:53 +0200
parents 11847:2b3ce80ffece
children 11849:7440d610e5f1
files plugins/mod_mimicking.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_mimicking.lua	Tue Oct 12 15:00:15 2021 +0200
+++ b/plugins/mod_mimicking.lua	Tue Oct 12 17:55:53 2021 +0200
@@ -29,7 +29,8 @@
 	end
 end);
 
-module:hook("user-deleted", function(user)
+module:hook_global("user-deleted", function(user)
+	if user.host ~= module.host then return end
 	local skel = skeleton(user.username);
 	local ok, err = skeletons:set(skel, nil);
 	if not ok and err then