refactor(events): extract event system to own module and generalize subscriber handling

This commit is contained in:
Anthony Rubick
2025-08-24 18:46:03 -05:00
parent d74ecb2444
commit f45d5f46b4
8 changed files with 218 additions and 201 deletions

View File

@@ -6,8 +6,8 @@ import (
"path/filepath"
"imuslab.com/zoraxy/mod/access"
"imuslab.com/zoraxy/mod/eventsystem"
"imuslab.com/zoraxy/mod/netutils"
"imuslab.com/zoraxy/mod/plugins"
"imuslab.com/zoraxy/mod/plugins/zoraxy_plugin"
)
@@ -51,7 +51,7 @@ func accessRequestBlocked(accessRule *access.AccessRule, templateDirectory strin
if err != nil {
comment = "blacklisted"
}
plugins.EventSystem.Emit(
eventsystem.Publisher.Emit(
&zoraxy_plugin.BlacklistedIPBlockedEvent{
IP: clientIpAddr,
Comment: comment,