# HG changeset patch # User Emmanuel Gil Peyrot # Date 1577648554 -3600 # Node ID 70e5bab388d81b3f79fb3e73c2f9c5efc7219600 # Parent 263f5f1ee71f571322e7fff3d58f463f6ef66954 mod_measure_message_e2ee: Make this module non-global; users can aggregate data if they care about that diff -r 263f5f1ee71f -r 70e5bab388d8 mod_measure_message_e2ee/mod_measure_message_e2ee.lua --- a/mod_measure_message_e2ee/mod_measure_message_e2ee.lua Sun Dec 29 19:53:23 2019 +0100 +++ b/mod_measure_message_e2ee/mod_measure_message_e2ee.lua Sun Dec 29 20:42:34 2019 +0100 @@ -1,5 +1,3 @@ -module:set_global(); - local count_message = module:measure("message", "rate"); local count_plain = module:measure("plain", "rate"); local count_openpgp = module:measure("openpgp", "rate"); @@ -45,9 +43,6 @@ end end -function module.add_host(host_module) - module:log("debug", "Loaded on host %s", host_module); - host_module:hook("pre-message/host", message_handler, 2); - host_module:hook("pre-message/bare", message_handler, 2); - host_module:hook("pre-message/full", message_handler, 2); -end +module:hook("pre-message/host", message_handler, 2); +module:hook("pre-message/bare", message_handler, 2); +module:hook("pre-message/full", message_handler, 2);