"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const msg_1 = __importDefault(require("../../models/msg"));
const msg_2 = require("../../../shared/types/msg");
exports.default = (function (irc, network) {
    const client = this;
    irc.on("loggedin", (data) => {
        const lobby = network.getLobby();
        const msg = new msg_1.default({
            type: msg_2.MessageType.LOGIN,
            text: "Logged in as: " + data.account,
        });
        lobby.pushMessage(client, msg, true);
    });
    irc.on("loggedout", () => {
        const lobby = network.getLobby();
        const msg = new msg_1.default({
            type: msg_2.MessageType.LOGOUT,
            text: "Logged out",
        });
        lobby.pushMessage(client, msg, true);
    });
});
