From e1e0f873c683904264d746e063a30165a4c26498 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Wed, 27 Dec 2023 20:08:03 +0100 Subject: [PATCH] Remove misleading comment The comment falsely indicates that malformed IRC messages would be null. However, since the switch to a proper parser the function always returns an IrcMessage object, no matter how broken the input is. ``` const parser = require('./src/irclineparser'); console.log(parser('\0')); // IrcMessage { // tags: [Object: null prototype] {}, // prefix: '', // nick: '', // ident: '', // hostname: '', // command: '\x00', // params: [] // } ``` Hence, remove the comment to avoid misleading readers but keep the guard, should the parser change in the future. --- src/connection.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/connection.js b/src/connection.js index e11daf5b..d348b54d 100644 --- a/src/connection.js +++ b/src/connection.js @@ -161,7 +161,6 @@ module.exports = class Connection extends EventEmitter { const message = ircLineParser(line); if (!message) { - // A malformed IRC line return; }