mirror of
https://github.com/thelounge/thelounge
synced 2025-02-17 05:38:25 +00:00
Disallow parting from lobbies
This commit is contained in:
parent
2d7d359621
commit
9deb0489f6
1 changed files with 13 additions and 1 deletions
|
@ -1,9 +1,21 @@
|
|||
var _ = require("lodash");
|
||||
var Msg = require("../../models/msg");
|
||||
|
||||
exports.commands = ["close", "leave", "part"];
|
||||
|
||||
exports.input = function(network, chan, cmd, args) {
|
||||
if (chan.type !== "query") {
|
||||
if (chan.type === "lobby") {
|
||||
this.emit("msg", {
|
||||
chan: chan.id,
|
||||
msg: new Msg({
|
||||
type: Msg.Type.ERROR,
|
||||
text: "You can not part from networks, use /quit instead."
|
||||
})
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (chan.type === "channel") {
|
||||
var irc = network.irc;
|
||||
if (args.length === 0) {
|
||||
args.push(chan.name);
|
||||
|
|
Loading…
Add table
Reference in a new issue