gf3 / IRC-js

The best IRC library for node.js
http://irc-js.com
The Unlicense
179 stars 33 forks source link

Connecting to ngIRCd does not work #38

Closed jsyrjala closed 13 years ago

jsyrjala commented 13 years ago

Connecting to ngIRCd does not work because of the following:

  1. ngircd server accepts incoming connection but send no data to client.
  2. The client (Jerk with irc-js) waits some kind of reply from the server before initiating the login (PASS, NICK and USER commands). Thus the client sends no data to server.
  3. server disconnects after 20 seconds or so.

I think that the correct behavior for the client is to send login commands right after connect, and not to wait for any data from the server. At least that is how clients like http://irssi.org/ do it.

gf3 commented 13 years ago

Good catch, I'll have to test it out.

gf3 commented 13 years ago

Maybe there is a way to detect this without the extra option?

jsyrjala commented 13 years ago

We could remove the option altogether, the client would always initiate the login right after connect. Would that cause problems with some servers?

I see no way to auto-detect this server behaviour, except to wait few seconds after connect, and initiate login if server hasn't said anything. But then again, if server says something, the IRC-js initiates login anyway.

I will make pull request for you where the client always sends login commands on connect

gf3 commented 13 years ago

Fixed in bfa34db4c9406790692135d3b3f0ce5b8618421f