thelounge/server/plugins/irc-events/info.ts
Reto Brunner 3eb19135f5 wip: msg
2024-04-21 15:10:41 +02:00

20 lines
475 B
TypeScript

import Msg from "../../models/msg";
import {IrcEventHandler} from "../../client";
import {MessageType} from "../../../shared/types/msg";
export default <IrcEventHandler>function (irc, network) {
const client = this;
irc.on("info", function (data) {
const lobby = network.getLobby();
if (data.info) {
const msg = new Msg({
type: MessageType.MONOSPACE_BLOCK,
command: "info",
text: data.info,
});
lobby.pushMessage(client, msg, true);
}
});
};