Diff

mod_audit/mod_audit.lua @ 5115:4a5837591380

mod_audit: remove event hook Let's keep it simple for now---also we expose the audit functionality on the moduleapi level anyway.
author Jonas Schäfer <jonas@wielicki.name>
date Thu, 28 Apr 2022 20:22:03 +0200
parent 4934:ae83200fb55f
child 5250:d9577083c5f5
line wrap: on
line diff
--- a/mod_audit/mod_audit.lua	Sat Oct 15 21:01:04 2022 +0100
+++ b/mod_audit/mod_audit.lua	Thu Apr 28 20:22:03 2022 +0200
@@ -1,5 +1,8 @@
 module:set_global();
 
+local audit_log_limit = module:get_option_number("audit_log_limit", 10000);
+local cleanup_after = module:get_option_string("audit_log_expires_after", "2w");
+
 local time_now = os.time;
 local st = require "util.stanza";
 local moduleapi = require "core.moduleapi";
@@ -81,5 +84,3 @@
 function moduleapi.audit(module, user, event_type, extra)
 	audit(module.host, user, "mod_" .. module:get_name(), event_type, extra);
 end
-
-module:hook("audit", audit, 0);