Comparison

plugins/mod_mimicking.lua @ 9982:d09575dae242

mod_mimicking: Hook the correct event names
author Kim Alvefur <zash@zash.se>
date Mon, 29 Apr 2019 02:37:35 +0200
parent 9981:8758febbaca2
child 9983:f7d11503fdce
comparison
equal deleted inserted replaced
9981:8758febbaca2 9982:d09575dae242
17 17
18 module:hook("user-registered", function(user) 18 module:hook("user-registered", function(user)
19 datamanager.store(skeleton(user.username), user.host, "skeletons", {username = user.username}); 19 datamanager.store(skeleton(user.username), user.host, "skeletons", {username = user.username});
20 end); 20 end);
21 21
22 module:hook("user-deregistered", function(user) 22 module:hook("user-deleted", function(user)
23 datamanager.store(skeleton(user.username), user.host, "skeletons", nil); 23 datamanager.store(skeleton(user.username), user.host, "skeletons", nil);
24 end); 24 end);
25 25
26 module:hook("registration-attempt", function(user) 26 module:hook("user-registering", function(user)
27 if datamanager.load(skeleton(user.username), user.host, "skeletons") then 27 if datamanager.load(skeleton(user.username), user.host, "skeletons") then
28 user.allowed = false; 28 user.allowed = false;
29 end 29 end
30 end); 30 end);
31 31