mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-17 05:36:36 +02:00
1dc92d8934
¯\_(ツ)_/¯
22 lines
433 B
JavaScript
22 lines
433 B
JavaScript
"use strict";
|
|
|
|
var Msg = require("../../models/msg");
|
|
var Chan = require("../../models/chan");
|
|
|
|
exports.commands = ["cycle", "rejoin"];
|
|
|
|
exports.input = function(network, chan) {
|
|
if (chan.type !== Chan.Type.CHANNEL) {
|
|
chan.pushMessage(this, new Msg({
|
|
type: Msg.Type.ERROR,
|
|
text: "You can only rejoin channels.",
|
|
}));
|
|
return;
|
|
}
|
|
|
|
network.irc.part(chan.name, "Rejoining");
|
|
network.irc.join(chan.name);
|
|
|
|
return true;
|
|
};
|