mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 12:33:07 +00:00
fade6a8d2e
This documents what we actually want and allows us to shift the logic to the network
19 lines
435 B
TypeScript
19 lines
435 B
TypeScript
import Msg, {MessageType} from "../../models/msg";
|
|
import {IrcEventHandler} from "../../client";
|
|
|
|
export default <IrcEventHandler>function (irc, network) {
|
|
const client = this;
|
|
|
|
irc.on("help", function (data) {
|
|
const lobby = network.getLobby();
|
|
|
|
if (data.help) {
|
|
const msg = new Msg({
|
|
type: MessageType.MONOSPACE_BLOCK,
|
|
command: "help",
|
|
text: data.help,
|
|
});
|
|
lobby.pushMessage(client, msg, true);
|
|
}
|
|
});
|
|
};
|