thelounge/server/plugins/irc-events/info.ts

21 lines
475 B
TypeScript
Raw Permalink Normal View History

2024-02-15 23:01:22 +01:00
import Msg from "../../models/msg";
import {IrcEventHandler} from "../../client";
2024-02-15 23:01:22 +01:00
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);
}
});
};