Hi all, I am a new user of the ngircd. I created an IRC client in C++ and i am now interested in testing it with your ngircd server. i am having some troubles during the registration phase and i don't understand where i am wrong. I wonder if any of you can help. The IRC protocol states that client has to register the user following these steps: 1. Pass message 2. Nick message 2. Service message 3. User message Actually, i create first a socket to the ngicrd (run win -n) which responds "Accepted connection from <IP> on socket <id>" then i send the following messages: PASS NOPASS\n\r NICK giggio\n\r USER guest 0 * :Ronald Reagan\n\r And after a while i get the following answers: Shutting down connection <id> (Timeout) with IP:port Client unregistered (<id>) : Timeout I tried to use /PASS or to erase \n\r but i always get a Timeout error. I don't get what i'm doing wrong since i am respecting the IRC Protocol cheers, alex
Hi Alessandro!
Am 24.04.2012 um 16:56 schrieb Alessandro Alessio:
then i send the following messages:
PASS NOPASS\n\r NICK giggio\n\r USER guest 0 * :Ronald Reagan\n\r
Really \n\r, ASCII 10, ASCII 13? This should be \r\n, ASCII 13, ASCII 10.
And please note: If you send a „PASS“ command at all, the user must exist! In your case ngIRCd must be able to authenticate „guest“ with password „NOPASS“.
If you don’t want to use passwords, don’t send a „PASS“ command at all.
And after a while i get the following answers: Shutting down connection <id> (Timeout) with IP:port Client unregistered (<id>) : Timeout
So ngIRCd thinks you didn’t complete user registration in time.
I tried to use /PASS or to erase \n\r but i always get a Timeout error.
The „/“ is a client-only convention, all „raw“ commands aren’t prefixed with this „command character“.
I don't get what i'm doing wrong since i am respecting the IRC Protocol
Are you? ;-)
Regards Alex
HI Alexander! Tnx for your reply. So you suggest to not use a PASS if the user is not registered right? But even sending a NICK without a PASS: NICK guest\n USER guest 0 * :Ronnie Reagan\n i get a 'Client "guest" unregistered: Read error!' This would suggest to register the user 'guest'. Usually, when using other IRC Client, a user can connect to an IRC Server without being registered before (i.e.: msg nickserv register PASSWORD EMAIL)
--- Mar 24/4/12, Alexander Barton alex@barton.de ha scritto:
Da: Alexander Barton alex@barton.de Oggetto: Re: [ngIRCd-ML] User Registration A: "Alessandro Alessio" alexoffspring@yahoo.com Cc: ngircd-ml@arthur.barton.de Data: Martedì 24 Aprile 2012, 16:44
Hi Alessandro!
Am 24.04.2012 um 16:56 schrieb Alessandro Alessio:
then i send the following messages: PASS NOPASS\n\r NICK giggio\n\r USER guest 0 * :Ronald Reagan\n\r
Really \n\r, ASCII 10, ASCII 13? This should be \r\n, ASCII 13, ASCII 10.
And please note: If you send a „PASS“ command at all, the user must exist! In your case ngIRCd must be able to authenticate „guest“ with password „NOPASS“.
If you don’t want to use passwords, don’t send a „PASS“ command at all.
And after a while i get the following answers: Shutting down connection <id> (Timeout) with IP:port Client unregistered (<id>) : Timeout
So ngIRCd thinks you didn’t complete user registration in time.
I tried to use /PASS or to erase \n\r but i always get a Timeout error.
The „/“ is a client-only convention, all „raw“ commands aren’t prefixed with this „command character“.
I don't get what i'm doing wrong since i am respecting the IRC Protocol
Are you? ;-)
Regards Alex
Hi Alessandro!
Am 26.04.2012 um 11:24 schrieb Alessandro Alessio:
Tnx for your reply. So you suggest to not use a PASS if the user is not registered right?
If you don’t use user authentication (a global server password or PAM), you must not send a PASS command right.
But even sending a NICK without a PASS:
NICK guest\n USER guest 0 * :Ronnie Reagan\n
i get a 'Client "guest" unregistered: Read error!‘
Which tells you, that ngIRCd „unregistered“ this client again because of a „read error“.
This would suggest to register the user 'guest‘.
No.
Usually, when using other IRC Client, a user can connect to an IRC Server without being registered before (i.e.: msg nickserv register PASSWORD EMAIL)
Nickserv has nothing to do with user login or the PASS command.
And as I already told you, the commands sent to the server should be:
Am 24.04.2012 um 16:56 schrieb Alessandro Alessio:
then i send the following messages:
PASS NOPASS\n\r NICK giggio\n\r USER guest 0 * :Ronald Reagan\n\r
Really \n\r, ASCII 10, ASCII 13? This should be \r\n, ASCII 13, ASCII 10.
You state above that you only send „\n“ which is ASCII 10, which doesn’t terminates an IRC command. Therefore ngIRCd didn’t get a single command from your client and most probably times out your connection. No?
If not, try to run ngIRCd in „sniffer“ mode („./configure --enable-sniffer“, „ngircd --nodaemon --sniffer“) and let’s have a look at the (complete) output you get.
Regards Alex
Alex, tnx again. The hint of using the sniffer is wonderful, but still cannot make it works. If i send cs->sendMessage("NICK guest\r\n"); cs->sendMessage("USER guest 0 * :Ronnie_Reagan\r\n"); i get:
[2532:7 4] Now resolving <ip>... [2532:7 4] Ok, translated <ip>to "<hostname>". [2532:7 4] Resolver sub-process 2532 done. [3784:7 4] Resolver: Got callback on fd 7, events 1 [3784:7 4] Got result from resolver: "<hostname>" (22 bytes read). [3784:7 4] Updating hostname of "*": "<ip>" -> "<hostname>" [3784:7 9] <- connection 6: 'NICK guest'. [3784:7 9] Connection 6: got valid NICK command ... [3784:7 25] Unregistered connection 6 timed out ... [3784:6 25] Shutting down connection 6 (Timeout) with <hostname>:52588 ... [3784:5 25] Client "guest" unregistered (connection 6): Timeout [3784:6 25] Connection 6 with <hostname>:52588 closed (in: 0.0k, out: 0.0k). [3784:7 25] Shutdown of connection 6 completed, 0 connections left. and if i send:
cs->sendMessage("USER guest 0 * :Ronnie_Reagan\r\n"); cs->sendMessage("NICK guest\r\n");
[5828:7 207] Now resolving <ip> ... [5828:7 207] Ok, translated <ip> to "<hostname>". [5828:7 207] Resolver sub-process 5828 done. [3784:7 207] Resolver: Got callback on fd 7, events 1 [3784:7 207] Got result from resolver: "<hostname>" (22 bytes read). [3784:7 207] Updating hostname of "*": "<ip>" -> "<hostname>" [3784:7 212] <- connection 6: 'USER guest 0 * :Ronnie_Reagan'. [3784:7 212] Connection 6: got valid USER command ... [3784:7 228] Unregistered connection 6 timed out ... [3784:6 228] Shutting down connection 6 (Timeout) with <hostname>:52619 ... [3784:5 228] Client unregistered (connection 6): Timeout [3784:6 228] Connection 6 with <hostname>:52619 closed (in: 0.0k, out: 0.0k). [3784:7 228] Shutdown of connection 6 completed, 0 connections left. So, syntax of both commands is correct, but in both cases only the first command is served. Tnx, Alex
--- Gio 26/4/12, Alexander Barton alex@barton.de ha scritto:
Da: Alexander Barton alex@barton.de Oggetto: Re: [ngIRCd-ML] User Registration A: "Alessandro Alessio" alexoffspring@yahoo.com Cc: ngircd-ml@arthur.barton.de Data: Giovedì 26 Aprile 2012, 11:13
Hi Alessandro!
Am 26.04.2012 um 11:24 schrieb Alessandro Alessio:
Tnx for your reply. So you suggest to not use a PASS if the user is not registered right?
If you don’t use user authentication (a global server password or PAM), you must not send a PASS command right.
But even sending a NICK without a PASS: NICK guest\n USER guest 0 * :Ronnie Reagan\n i get a 'Client "guest" unregistered: Read error!‘
Which tells you, that ngIRCd „unregistered“ this client again because of a „read error“.
This would suggest to register the user 'guest‘.
No.
Usually, when using other IRC Client, a user can connect to an IRC Server without being registered before (i.e.: msg nickserv register PASSWORD EMAIL)
Nickserv has nothing to do with user login or the PASS command.
And as I already told you, the commands sent to the server should be:
Am 24.04.2012 um 16:56 schrieb Alessandro Alessio:
then i send the following messages: PASS NOPASS\n\r NICK giggio\n\r USER guest 0 * :Ronald Reagan\n\r
Really \n\r, ASCII 10, ASCII 13? This should be \r\n, ASCII 13, ASCII 10.
You state above that you only send „\n“ which is ASCII 10, which doesn’t terminates an IRC command. Therefore ngIRCd didn’t get a single command from your client and most probably times out your connection. No?
If not, try to run ngIRCd in „sniffer“ mode („./configure --enable-sniffer“, „ngircd --nodaemon --sniffer“) and let’s have a look at the (complete) output you get.
Regards Alex
Am 26.04.2012 14:16, schrieb Alessandro Alessio:
and if i send:
cs->sendMessage("USER guest 0 * :Ronnie_Reaganrn"); cs->sendMessage("NICK guestrn");
[5828:7 207] Now resolving <ip> ... [5828:7 207] Ok, translated <ip> to "<hostname>". [5828:7 207] Resolver sub-process 5828 done. [3784:7 207] Resolver: Got callback on fd 7, events 1 [3784:7 207] Got result from resolver: "<hostname>" (22 bytes read). [3784:7 207] Updating hostname of "*": "<ip>" -> "<hostname>" [3784:7 212] <- connection 6: 'USER guest 0 * :Ronnie_Reagan'. [3784:7 212] Connection 6: got valid USER command ... [3784:7 228] Unregistered connection 6 timed out ... [3784:6 228] Shutting down connection 6 (Timeout) with <hostname>:52619 ... [3784:5 228] Client unregistered (connection 6): Timeout [3784:6 228] Connection 6 with <hostname>:52619 closed (in: 0.0k, out: 0.0k). [3784:7 228] Shutdown of connection 6 completed, 0 connections left.
So, syntax of both commands is correct, but in both cases only the _first_ command is served.
Most probably your client isn't (correctly) sending the command to the network, which you can double check using tcpdump, for example. I don't think that it's ngircd dropping silently only "your" command, because in this case no IRC client would be able to connect at all ...
Regards Alex
I actually tried to use (as you write in -- Protocol.txt --)
WEBIRC <pwd> guest <host_name> <ip>\n as the very first command sent to the server but i always get: Client unregistered. Tnx Alex
--- Mar 24/4/12, Alexander Barton alex@barton.de ha scritto:
Da: Alexander Barton alex@barton.de Oggetto: Re: [ngIRCd-ML] User Registration A: "Alessandro Alessio" alexoffspring@yahoo.com Cc: ngircd-ml@arthur.barton.de Data: Martedì 24 Aprile 2012, 16:44
Hi Alessandro!
Am 24.04.2012 um 16:56 schrieb Alessandro Alessio:
then i send the following messages: PASS NOPASS\n\r NICK giggio\n\r USER guest 0 * :Ronald Reagan\n\r
Really \n\r, ASCII 10, ASCII 13? This should be \r\n, ASCII 13, ASCII 10.
And please note: If you send a „PASS“ command at all, the user must exist! In your case ngIRCd must be able to authenticate „guest“ with password „NOPASS“.
If you don’t want to use passwords, don’t send a „PASS“ command at all.
And after a while i get the following answers: Shutting down connection <id> (Timeout) with IP:port Client unregistered (<id>) : Timeout
So ngIRCd thinks you didn’t complete user registration in time.
I tried to use /PASS or to erase \n\r but i always get a Timeout error.
The „/“ is a client-only convention, all „raw“ commands aren’t prefixed with this „command character“.
I don't get what i'm doing wrong since i am respecting the IRC Protocol
Are you? ;-)
Regards Alex