mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-28 11:22:34 +02:00
1e3a7b1250
Closes GH-3921
28 lines
530 B
JavaScript
28 lines
530 B
JavaScript
"use strict";
|
|
|
|
const Msg = require("../../models/msg");
|
|
|
|
module.exports = function (irc, network) {
|
|
const client = this;
|
|
|
|
irc.on("loggedin", (data) => {
|
|
const lobby = network.channels[0];
|
|
|
|
const msg = new Msg({
|
|
type: Msg.Type.LOGIN,
|
|
text: "Logged in as: " + data.account,
|
|
});
|
|
lobby.pushMessage(client, msg, true);
|
|
});
|
|
|
|
irc.on("loggedout", () => {
|
|
const lobby = network.channels[0];
|
|
|
|
const msg = new Msg({
|
|
type: Msg.Type.LOGOUT,
|
|
text: "Logged out",
|
|
});
|
|
lobby.pushMessage(client, msg, true);
|
|
});
|
|
};
|