How nekoimeiov/astrbot_plugin_reneban works
ReNeBan is an AstrBot blacklist plugin. Administrators issue commands to create, adjust, remove, reset, or inspect temporary/permanent user and session records; the plugin persists those records, and event checks apply session-first, pass-before-ban decisions. Main command handling and the enforcement checker are distinct runtime responsibilities, supported by a model/expiry layer and file-backed storage. The excerpts show command-to-storage and enforcement-to-storage behavior; event-hook wiring and some command handlers are not visible, so those links are omitted or marked unverified.
Main entry points: main.py Command Handlers · datafile_manager.py Data Manager · user_manager.py Timed Records · event_utils.py Ban Decision
Components 10
Admin Commands
- Command Handlers
main.py - Help And Replies
strings.py
Enforcement
- Ban Decision
event_utils.py
Record Management
- Timed Records
user_manager.py - Time Parsing
time_utils.py - Domain Errors
exceptions.py
Persistence
- Data Manager
datafile_manager.py - Blacklist Files
datafile_manager.py
Other components
- Administrator
- AstrBot Runtime
Connections 11
- Administrator → Command Handlers: issues commands
README.md - Command Handlers → Data Manager: reads and writes
main.py - Command Handlers → Time Parsing: parses durations
main.py - Command Handlers → Help And Replies: formats replies
main.py - AstrBot Runtime → Ban Decision: dispatches events
- Ban Decision → Data Manager: checks records
event_utils.py - Data Manager → Blacklist Files: reads and commits
datafile_manager.py - Data Manager → Timed Records: uses record models
datafile_manager.py - Timed Records → Help And Replies: normalizes reasons
user_manager.py - Timed Records → Domain Errors: raises time errors
user_manager.py - Time Parsing → Domain Errors: raises parse errors
time_utils.py