-
Notifications
You must be signed in to change notification settings - Fork 292
send nick change from irc to discord #235
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. @Throne3d - what do you think?
lib/bot.js
Outdated
@@ -125,6 +125,20 @@ class Bot { | |||
this.sendToDiscord(author, to, `*${text}*`); | |||
}); | |||
|
|||
this.ircClient.on('nick', (oldnick, newnick, channels) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oldNick
and newNick
maybe? Nitpick :)
The only thing I would be wary about is if the library sends the list of channels containing every channel, like it does for quit, in which case this (I think) will send to all channels, even ones the user isn't in. I haven't actually tried it out in practice yet so this might be a nonissue. |
edited tests to reflect these changes
This should work fine, I think. |
Thanks! |
anoy discord user with the nick changes of the irc users