refactor: move event types into own submodule

This commit is contained in:
Anthony Rubick
2025-08-31 21:27:45 -05:00
parent f45d5f46b4
commit 22d2a0c6ca
8 changed files with 44 additions and 40 deletions

View File

@@ -8,7 +8,7 @@ import (
"imuslab.com/zoraxy/mod/access"
"imuslab.com/zoraxy/mod/eventsystem"
"imuslab.com/zoraxy/mod/netutils"
"imuslab.com/zoraxy/mod/plugins/zoraxy_plugin"
"imuslab.com/zoraxy/mod/plugins/zoraxy_plugin/events"
)
// Handle access check (blacklist / whitelist), return true if request is handled (aka blocked)
@@ -52,7 +52,7 @@ func accessRequestBlocked(accessRule *access.AccessRule, templateDirectory strin
comment = "blacklisted"
}
eventsystem.Publisher.Emit(
&zoraxy_plugin.BlacklistedIPBlockedEvent{
&events.BlacklistedIPBlockedEvent{
IP: clientIpAddr,
Comment: comment,
RequestedURL: r.URL.String(),