diff --git a/.eslintrc.json b/.eslintrc.json index ed1280b..f331597 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ "semi": [ "error", "always" - ] + ], + "no-console": "off" } } \ No newline at end of file diff --git a/src/inc/clients/irc.js b/src/inc/clients/irc.js index b429302..df11ef7 100644 --- a/src/inc/clients/irc.js +++ b/src/inc/clients/irc.js @@ -37,6 +37,8 @@ class irc { this.socket.on("data", msg => { msg = this.parse(msg); let tmpuser = {}; + let tmpchan = {}; + let chans = []; switch (msg.command) { // auslagern! // WHOIS BEGIN case "307": // Rizon Account @@ -82,7 +84,7 @@ class irc { this.server.user.set( msg.params[1].toLowerCase(), tmpuser ); break; case "319": // Chanlist Todo - let tmpchan = new Map(); + tmpchan = new Map(); tmpuser = {}; if (this.server.user.has( msg.params[1].toLowerCase() )) { tmpuser = this.server.user.get( msg.params[1].toLowerCase() ); @@ -90,7 +92,7 @@ class irc { tmpchan = tmpuser.channels; } - let chans = msg.params[2].trim().split(" "); + chans = msg.params[2].trim().split(" "); for(let chan in chans) { chan = chans[chan].split("#"); tmpchan.set(`#${chan[1]}`, chan[0]);