mirror of
https://github.com/thelounge/thelounge
synced 2024-11-30 15:59:13 +00:00
20 lines
475 B
TypeScript
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);
|
|
}
|
|
});
|
|
};
|