From 8b0b8cac98d650d175ebb26441d415b95fca0e4e Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Thu, 12 Dec 2024 22:17:39 +0100 Subject: [PATCH] akashi expects 2 args for modcalls --- webAO/client/sender/index.ts | 2 +- webAO/client/sender/sendZZ.ts | 8 ++------ webAO/dom/callMod.ts | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/webAO/client/sender/index.ts b/webAO/client/sender/index.ts index a50fce3a..e218b6bc 100644 --- a/webAO/client/sender/index.ts +++ b/webAO/client/sender/index.ts @@ -49,7 +49,7 @@ export interface ISender { sendCharacter: (character: number) => void; sendRT: (testimony: string) => void; sendMusicChange: (track: string) => void; - sendZZ: (msg: string) => void; + sendZZ: (msg: string, target: number) => void; sendEE: (id: number, name: string, desc: string, img: string) => void; sendDE: (id: number) => void; sendPE: (name: string, desc: string, img: string) => void; diff --git a/webAO/client/sender/sendZZ.ts b/webAO/client/sender/sendZZ.ts index e9bd443c..5ff3713b 100644 --- a/webAO/client/sender/sendZZ.ts +++ b/webAO/client/sender/sendZZ.ts @@ -4,10 +4,6 @@ import { client, extrafeatures } from "../../client"; * Sends call mod command. * @param {string} message to mod */ -export const sendZZ = (msg: string) => { - if (extrafeatures.includes("modcall_reason")) { - client.sender.sendServer(`ZZ#${msg}#%`); - } else { - client.sender.sendServer("ZZ#%"); - } +export const sendZZ = (msg: string, target: number) => { + client.sender.sendServer(`ZZ#${msg}#${target}#%`); }; diff --git a/webAO/dom/callMod.ts b/webAO/dom/callMod.ts index 8d4c80df..567ed9d4 100644 --- a/webAO/dom/callMod.ts +++ b/webAO/dom/callMod.ts @@ -10,7 +10,7 @@ export function callMod() { if (modcall == null || modcall === "") { // cancel } else { - client.sender.sendZZ(modcall); + client.sender.sendZZ(modcall,-1); } } window.callMod = callMod;