thelounge/src/plugins/irc-events/sasl.js
2022-02-10 22:30:04 +01:00

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);
});
};