Convert global_chat, research_sync and statistics_exporter to entrypoint functions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-08 05:15:00 +00:00
1 parent bd609c3c54
commit cfeb4b6a4a
7 files changed
+231 -237

No files matched your search

+4 -4
View File
@@ -1,5 +1,5 @@
import { CommandTree, Command } from "@clusterio/lib";
import { BaseCtlPlugin } from "@clusterio/ctl";
import type { CtlPluginContext } from "@clusterio/ctl";
import { ChatEvent } from "./messages.js";
const globalChatCommands = new CommandTree({
@@ -14,8 +14,8 @@ globalChatCommands.add(new Command({
},
}));
export class CtlPlugin extends BaseCtlPlugin {
async addCommands(rootCommand: CommandTree) {
export default async function(context: CtlPluginContext) {
context.hooks.addCommands.attach(context.plugin.name, async (rootCommand) => {
rootCommand.add(globalChatCommands);
}
});
}