2022-06-19 00:25:21 +00:00
|
|
|
import Msg, {MessageType} from "../../models/msg";
|
|
|
|
import {IrcEventHandler} from "../../client";
|
2020-06-29 07:51:17 +00:00
|
|
|
|
2022-06-19 00:25:21 +00:00
|
|
|
export default <IrcEventHandler>function (irc, network) {
|
2020-06-29 07:51:17 +00:00
|
|
|
const client = this;
|
|
|
|
|
|
|
|
irc.on("info", function (data) {
|
2023-02-27 17:30:33 +00:00
|
|
|
const lobby = network.getLobby();
|
2020-06-29 07:51:17 +00:00
|
|
|
|
|
|
|
if (data.info) {
|
|
|
|
const msg = new Msg({
|
2022-06-19 00:25:21 +00:00
|
|
|
type: MessageType.MONOSPACE_BLOCK,
|
2020-06-29 07:51:17 +00:00
|
|
|
command: "info",
|
|
|
|
text: data.info,
|
|
|
|
});
|
2020-08-14 11:26:03 +00:00
|
|
|
lobby.pushMessage(client, msg, true);
|
2020-06-29 07:51:17 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|