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

0.3.x : 'nicknameinuse' event missing #258

Closed
centime opened this issue Nov 27, 2014 · 1 comment
Closed

0.3.x : 'nicknameinuse' event missing #258

centime opened this issue Nov 27, 2014 · 1 comment
Milestone

Comments

@centime
Copy link

centime commented Nov 27, 2014

Hi,
First, thank you for this lib, I've been using it a lot last year, in it's previous version 0.3.x

I see you rewrote most of it, so maybe my issue isn't anymore, but looking at my old project I saw a quick fix that I did back then, thought it was worth putting it here.

There is no 'nicknameinuse' event raised by the client when it tries to connect to the server.

The workaround I applied was very straightforward :

in irc.js, around line 190, after :

   case "err_nicknameinuse":
            if ( typeof(self.opt.nickMod) == 'undefined' )
                self.opt.nickMod = 0;
            self.opt.nickMod++;
            self.send("NICK", self.opt.nick + self.opt.nickMod);
            self.nick = self.opt.nick + self.opt.nickMod;

just add :
self.emit('nicknameinuse',self.opt.nick,self.nick);

Maybe some other parts of the code should reflect this change as well, but it worked and I didn't look any further.

@jirwin jirwin added this to the 0.4 milestone Jan 10, 2015
@ghost
Copy link

ghost commented Jan 14, 2015

This looks like it's already merged.

@ghost ghost closed this as completed Jan 14, 2015
This issue was closed.
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

No branches or pull requests

2 participants