diff options
| author | Alexander Barton <alex@barton.de> | 2008-11-11 23:10:52 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2008-11-11 23:11:49 +0100 |
| commit | 5a91d621009d6a0f3b8e5ff054aa6ae7e3195191 (patch) | |
| tree | 6f41bbdefa340a550cffbc7d921bf81c8d787e09 /src | |
| parent | 3a5b7b63ae493aeff7b6ec85ebbfbc39202d0bc4 (diff) | |
| download | ngircd-5a91d621009d6a0f3b8e5ff054aa6ae7e3195191.tar.gz ngircd-5a91d621009d6a0f3b8e5ff054aa6ae7e3195191.zip | |
Ignore numeric 020 ("please wait while we process your coinnection")
Some servers send the numeric 020 ("please wait while we process your
connection") when a client connects. This is no useful information for
this server, so we simply ignore it :-)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/parse.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 493fbdc0..ec856a0c 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -381,7 +381,8 @@ static bool Handle_Numeric(CLIENT *client, REQUEST *Req) { static const struct _NUMERIC Numerics[] = { - { 005, IRC_Num_ISUPPORT }, + { 5, IRC_Num_ISUPPORT }, + { 20, NULL }, { 376, IRC_Num_ENDOFMOTD } }; int i, num; @@ -389,8 +390,12 @@ Handle_Numeric(CLIENT *client, REQUEST *Req) CLIENT *prefix, *target = NULL; /* Determine target */ - if (Req->argc > 0) - target = Client_Search(Req->argv[0]); + if (Req->argc > 0) { + if (strcmp(Req->argv[0], "*") != 0) + target = Client_Search(Req->argv[0]); + else + target = Client_ThisServer(); + } if (!target) { /* Status code without target!? */ @@ -409,8 +414,11 @@ Handle_Numeric(CLIENT *client, REQUEST *Req) num = atoi(Req->command); for (i = 0; i < (int) ARRAY_SIZE(Numerics); i++) { - if (num == Numerics[i].numeric) + if (num == Numerics[i].numeric) { + if (!Numerics[i].function) + return CONNECTED; return Numerics[i].function(client, Req); + } } LogDebug("Ignored status code %s from \"%s\".", |