Binato/server/packets/SendPublicMessage.ts

10 lines
373 B
TypeScript
Raw Normal View History

2023-10-03 10:09:44 +01:00
import { Channel } from "diagnostics_channel";
import MessageData from "../interfaces/MessageData";
import User from "../objects/User";
export default function SendPublicMessage(user:User, message:MessageData) {
const channel = user.shared.chatManager.GetChannelByName(message.target);
if (channel instanceof Channel) {
channel.SendMessage(user, message.message);
}
}