2023-10-03 10:09:44 +01:00
|
|
|
import { Channel } from "diagnostics_channel";
|
2023-10-06 11:19:08 +01:00
|
|
|
import MessageData from "../interfaces/packetTypes/MessageData";
|
2023-10-03 10:09:44 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|