This commit is contained in:
phidias authored and GitHub committed 2026-10-10 03:56:29 +09:00
1 parent 63fa42006c
commit a978173f06
2 files changed
+4 -7

No files matched your search

+2
View File
@@ -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()}\`**`);
}
});
+2 -7
View File
@@ -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;
}