diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2026-03-14 14:43:24 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2026-03-14 14:43:24 -0700 |
| commit | 2cf9f33ef42188dd35eaf4905cd2f05557aecca1 (patch) | |
| tree | e2cb7db1ccd7a4defae39395b76b144d66aacf2c /hotline/chat.go | |
| parent | 0003a0912b04308fbbdfcb2801d0373e6d4de2f0 (diff) | |
Refactor ban management behind BanMgr interface
Extract ban logic into a BanMgr interface with two implementations:
- BanFile: file-based YAML storage with support for IP, username, and
nickname bans (backwards-compatible with legacy format)
- RedisBanMgr: Redis-backed implementation with permanent and temporary
ban support, using fail-safe deny-on-error behavior
This replaces scattered Redis calls in API handlers, transaction
handlers, and server connection logic with unified interface calls,
removing the Redis dependency from the API server constructor and
enabling ban functionality for both file-only and Redis deployments.
Diffstat (limited to 'hotline/chat.go')
0 files changed, 0 insertions, 0 deletions