From a978173f0636098fd8b65d608d0dbf3acff5ca99 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 10 Oct 2026 03:56:29 +0900 Subject: [PATCH] . --- controller.ts | 2 ++ instance.ts | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/controller.ts b/controller.ts index b8e76ee..7d5104a 100644 --- a/controller.ts +++ b/controller.ts @@ -122,6 +122,8 @@ export default async function(context: ControllerPluginContext) { if (verb) { await sendMessage(instanceName, `**\`${content.trim()}\`** ${verb}`); + } else { + await sendMessage(instanceName, `unknown action ${action} **\`${content.trim()}\`**`); } }); diff --git a/instance.ts b/instance.ts index 020fd32..5a33286 100644 --- a/instance.ts +++ b/instance.ts @@ -2,7 +2,7 @@ import type {InstancePluginContext} from '@clusterio/host'; import {ChatEvent} from './index.js'; export default async function(context: InstancePluginContext) { - const {instance, host, logger, plugin} = context; + const {instance, host, plugin} = context; let queue: [string, string][] = []; instance.hooks.controllerConnectionEvent.attach(plugin.name, async (event) => { @@ -26,12 +26,7 @@ export default async function(context: InstancePluginContext) { }); instance.hooks.output.attach(plugin.name, async (output) => { - if (output.type === 'info') { - logger.info(output.message) - return; - } - - if (output.type !== 'action') { + if (output.type !== 'action' && output.type !== 'info') { return; }