From d6925c982e314e49fbb92025ce633f132790b668 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 10 May 2007 09:22:28 +0000 Subject: Fixed bug with PING answer: removed one colon at beginning of PONG arguments (bug #19846) --- src/irc/irc-recv.c | 6 ++++++ weechat/src/irc/irc-recv.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index 688444840..71518a4ca 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -1197,10 +1197,16 @@ irc_cmd_recv_ping (t_irc_server *server, char *host, char *nick, char *arguments /* make C compiler happy */ (void) host; (void) nick; + + if (arguments[0] == ':') + arguments++; + pos = strrchr (arguments, ' '); if (pos) pos[0] = '\0'; + server_sendf (server, "PONG :%s", arguments); + return 0; } diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c index 688444840..71518a4ca 100644 --- a/weechat/src/irc/irc-recv.c +++ b/weechat/src/irc/irc-recv.c @@ -1197,10 +1197,16 @@ irc_cmd_recv_ping (t_irc_server *server, char *host, char *nick, char *arguments /* make C compiler happy */ (void) host; (void) nick; + + if (arguments[0] == ':') + arguments++; + pos = strrchr (arguments, ' '); if (pos) pos[0] = '\0'; + server_sendf (server, "PONG :%s", arguments); + return 0; } -- cgit v1.2.3