import express from 'express';
import { ChatSystem } from '../../../../features/chat';
import { ChatColors } from '../../../../const/chat-colors';

export async function AOOCChat(req: express.Request, res: express.Response) {
    const message = req.body.message;
    const from = req.body.from;

    mp.players.forEach((target: PlayerMp) => {
        const msg = `${ChatColors.orange} [AOOC] ${from}: ${message}`;
        ChatSystem.Message(target, msg, 'discord');
    });

    res.sendStatus(200);
}
