Merged
Conversation
__main__.py: 引入 get_driver、command_rule、set_group、load_pages 等;新增 refresh_server_command_rule() 统一重建 l4_request 的命令匹配;reload_ip() 后都会调用它,保证新增/变更的服务器组即时能用。启动时通过 driver.on_startup 调用 sync_sb_pages_groups(),自动遍历 sb_pages.json 抓取 SourceBans、写回 data/L4D2/l4d2/<组>.json,再重载内存。/l4reload 与 /l4addban 完成后也会执行同样的重载步骤。 l4_request/__init__.py: 在 reload_ip() 开头清空 ALLHOST、COMMAND,防止旧数据残留。 commands/server_groups.py: l4reloadsb 调整为 .send() 反馈结果,确保消息发送后继续执行 reload_ip() 和 refresh_server_command_rule(),避免“刷新成功但命令仍是旧数据”的情况。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main.py: 引入 get_driver、command_rule、set_group、load_pages 等;新增 refresh_server_command_rule() 统一重建 l4_request 的命令匹配;reload_ip() 后都会调用它,保证新增/变更的服务器组即时能用。启动时通过 driver.on_startup 调用 sync_sb_pages_groups(),自动遍历 sb_pages.json 抓取 SourceBans、写回 data/L4D2/l4d2/<组>.json,再重载内存。/l4reload 与 /l4addban 完成后也会执行同样的重载步骤。
l4_request/init.py: 在 reload_ip() 开头清空 ALLHOST、COMMAND,防止旧数据残留。
commands/server_groups.py: l4reloadsb 调整为 .send() 反馈结果,确保消息发送后继续执行 reload_ip() 和 refresh_server_command_rule(),避免“刷新成功但命令仍是旧数据”的情况。