# HG changeset patch # User Kim Alvefur # Date 1634054153 -7200 # Node ID b4d4f0339e16ffbca903c2a5bee114174fd197f8 # Parent 2b3ce80ffeceb8d9d94f1864933c8b2cf682124c mod_mimicking: Correctly hook the *global* user-deleted event diff -r 2b3ce80ffece -r b4d4f0339e16 plugins/mod_mimicking.lua --- 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