Delete some files and undo server change

This commit is contained in:
Pavel Djundik 2018-07-08 20:35:46 +03:00 committed by Pavel Djundik
parent 7b209e5d31
commit 3300276c27
5 changed files with 6 additions and 17 deletions

View File

@ -1,7 +0,0 @@
"use strict";
const escape = require("css.escape");
module.exports = function(orig) {
return escape(orig.toLowerCase());
};

View File

@ -1,5 +0,0 @@
"use strict";
module.exports = function tojson(context) {
return JSON.stringify(context);
};

View File

@ -2,7 +2,7 @@
const $ = require("jquery");
const socket = require("../socket");
const {vueApp} = require("../vue");
const {vueApp, findChannel} = require("../vue");
socket.on("part", function(data) {
// When parting from the active channel/query, jump to the network's lobby
@ -13,6 +13,9 @@ socket.on("part", function(data) {
.trigger("click");
}
const network = vueApp.networks.find((n) => n.uuid === data.network);
network.channels.splice(network.channels.findIndex((c) => c.id === data.chan), 1);
const channel = findChannel(data.chan);
if (channel) {
channel.network.channels.splice(channel.network.channels.findIndex((c) => c.id === data.chan), 1);
}
});

View File

@ -35,7 +35,6 @@ exports.input = function(network, chan, cmd, args) {
network.channels = _.without(network.channels, target);
target.destroy();
this.emit("part", {
network: network.uuid,
chan: target.id,
});
this.save();

View File

@ -29,7 +29,6 @@ module.exports = function(irc, network) {
chan.destroy();
client.save();
client.emit("part", {
network: network.uuid,
chan: chan.id,
});
} else {