From 51b22759b68234d7ded9ea4649395cf976002e7c Mon Sep 17 00:00:00 2001 From: Alexander Barton <alex@barton.de> Date: Thu, 15 Dec 2005 11:01:59 +0000 Subject: [PATCH] Return PING argument in PONG reply if STRICT_RFC is not defined [from HEAD]. Fixes Debian Bug #343200. --- src/ngircd/irc-login.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index db04a9c3..72065427 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: irc-login.c,v 1.44 2005/06/04 12:32:09 fw Exp $"; +static char UNUSED id[] = "$Id: irc-login.c,v 1.44.2.1 2005/12/15 11:01:59 alex Exp $"; #include "imp.h" #include <assert.h> @@ -456,7 +456,15 @@ IRC_PING( CLIENT *Client, REQUEST *Req ) } Log( LOG_DEBUG, "Connection %d: got PING, sending PONG ...", Client_Conn( Client )); - return IRC_WriteStrClient( Client, "PONG %s :%s", Client_ID( Client_ThisServer( )), Client_ID( Client )); +#ifdef STRICT_RFC + return IRC_WriteStrClient(Client, "PONG %s :%s", + Client_ID(Client_ThisServer()), Client_ID(Client)); +#else + /* Some clients depend on the argument being returned in the PONG + * reply (not mentioned in any RFC, though) */ + return IRC_WriteStrClient(Client, "PONG %s :%s", + Client_ID(Client_ThisServer( )), Req->argv[0]); +#endif } /* IRC_PING */ -- 2.40.0