Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove misleading comment #370

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

brunnre8
Copy link
Contributor

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.

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.
@ItsOnlyBinary ItsOnlyBinary merged commit fa79f5d into kiwiirc:master Jan 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants