From 4b7bcde5775eac0b2edbc4fa45a076585103af6b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 9 Nov 2000 21:21:29 +0000 Subject: PING from client wasn't handled correctly. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@820 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/proxy/listen.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c index 47e762e1..a8c04e4d 100644 --- a/src/irc/proxy/listen.c +++ b/src/irc/proxy/listen.c @@ -143,8 +143,13 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args) return; } if (strcmp(cmd, "PING") == 0) { - proxy_outdata(client, "PONG proxy :%s\n", args); - return; + char *server = strchr(args, ':'); + if (server == NULL || strcmp(server, "proxy") == 0) { + if (server != NULL) *server = '\0'; + if (*args == '\0') args = client->nick; + proxy_outdata(client, "PONG proxy :%s\n", args); + return; + } } if (client->server == NULL || !client->server->connected) { -- cgit v1.2.3