mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
Update irc-framework, fixes quitting networks
This commit is contained in:
parent
769bd16c8b
commit
d1da4b338a
4 changed files with 11 additions and 7 deletions
|
@ -33,7 +33,7 @@
|
|||
"event-stream": "3.3.2",
|
||||
"express": "4.13.4",
|
||||
"lodash": "4.6.1",
|
||||
"irc-framework": "1.0.4",
|
||||
"irc-framework": "1.0.6",
|
||||
"mkdirp": "0.5.1",
|
||||
"moment": "2.12.0",
|
||||
"read": "1.0.7",
|
||||
|
|
|
@ -338,10 +338,7 @@ Client.prototype.quit = function() {
|
|||
}
|
||||
}
|
||||
this.networks.forEach(function(network) {
|
||||
var irc = network.irc;
|
||||
if (irc.connection) {
|
||||
irc.connection.end();
|
||||
}
|
||||
network.irc.quit("Page closed");
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module.exports = function(irc, network) {
|
|||
});
|
||||
|
||||
irc.on("raw socket connected", function() {
|
||||
identd.hook(irc.socket, network.username);
|
||||
identd.hook(irc.connection.socket, network.username);
|
||||
});
|
||||
|
||||
irc.on("socket connected", function() {
|
||||
|
|
|
@ -2,8 +2,15 @@ var Msg = require("../../models/msg");
|
|||
|
||||
module.exports = function(irc, network) {
|
||||
var client = this;
|
||||
|
||||
// TODO: remove later
|
||||
irc.on("irc_error", function(data) {
|
||||
console.log(data);
|
||||
console.log("Got an irc_error");
|
||||
irc.emit("error", data);
|
||||
});
|
||||
|
||||
irc.on("error", function(data) {
|
||||
console.log("error", data);
|
||||
var text = data.error;
|
||||
if (data.reason) {
|
||||
text = data.reason + " (" + text + ")";
|
||||
|
|
Loading…
Reference in a new issue