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

20 lines
435 B
TypeScript
Raw Normal View History

import Msg, {MessageType} from "../../models/msg";
import {IrcEventHandler} from "../../client";
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);
}
});
};