Skip to content

Commit

Permalink
Optionally ignore the VERSION CTCP handling is the version option is …
Browse files Browse the repository at this point in the history
…not set
  • Loading branch information
prawnsalad committed Nov 14, 2017
1 parent 4786e01 commit 530306d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ Also triggers a **message** event with .type = 'privmsg'


**ctcp request**

The `VERSION` CTCP is handled internally and will not trigger this event, unless you set the
`version` option to `null`
~~~javascript
{
nick: 'prawnsalad',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/handlers/messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var handlers = {
account: command.getTag('account')
});

} else if (ctcp_command === 'VERSION') {
} else if (ctcp_command === 'VERSION' && this.connection.options.version) {
this.connection.write(util.format(
'NOTICE %s :\x01VERSION %s\x01',
command.nick,
Expand Down

0 comments on commit 530306d

Please sign in to comment.