Skip to content

重构插件加载器、BotContext、AnnotationMap 新增方法、修复部分 Bug#254

Merged
crazywhalecc merged 15 commits into
mainfrom
plugin-meta-ng
Jan 15, 2023
Merged

重构插件加载器、BotContext、AnnotationMap 新增方法、修复部分 Bug#254
crazywhalecc merged 15 commits into
mainfrom
plugin-meta-ng

Conversation

@crazywhalecc
Copy link
Copy Markdown
Member

@crazywhalecc crazywhalecc commented Jan 12, 2023

  • 重构 ZMPlugin 类,使用 Traits 分离
  • 新增 PluginMeta 对象用于格式化和规范化 zmplugin.json 的读取
  • 新增单个注解添加方法:AnnotationMap::addSingleAnnotation()
  • 优化 BotContext,使其支持继承
  • 修复 Windows 下按 Ctrl+C 无法停止的 Bug
  • 优化内置插件 onebot12-ban-other-ws,如果当前 WebSocketOpenEvent 设置了连接信息则忽略断开

@crazywhalecc crazywhalecc requested a review from sunxyw January 13, 2023 06:26
@crazywhalecc crazywhalecc changed the title 重构 ZMPlugin 的加载器 重构插件加载器、BotContext、AnnotationMap 新增方法、修复部分 Bug Jan 13, 2023
@crazywhalecc crazywhalecc added the improvement 对于现有代码或逻辑的改进 label Jan 13, 2023
Comment thread src/Globals/script_setup_loader.php
Comment thread src/ZM/Annotation/AnnotationMap.php
Comment thread src/ZM/Command/Generate/TextGenerateCommand.php Outdated
Comment thread src/ZM/Command/Plugin/PluginPackCommand.php
Comment thread src/ZM/Container/ContainerRegistrant.php
Comment thread src/ZM/Context/Trait/BotActionTrait.php
Comment thread src/ZM/Event/Listener/WorkerEventListener.php
@crazywhalecc crazywhalecc merged commit b0165e1 into main Jan 15, 2023
@crazywhalecc crazywhalecc deleted the plugin-meta-ng branch January 15, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement 对于现有代码或逻辑的改进

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants