kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
180 stars 62 forks source link

Remove misleading comment #370

Closed brunnre8 closed 6 months ago

brunnre8 commented 6 months ago

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.