1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Handle PING requests now properly.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2330 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-01-20 14:03:14 +00:00 committed by cras
parent 117f27eb92
commit 93061dd48f

View File

@ -513,13 +513,14 @@ static void event_error(IRC_SERVER_REC *server, const char *data)
static void event_ping(IRC_SERVER_REC *server, const char *data) static void event_ping(IRC_SERVER_REC *server, const char *data)
{ {
char *str; char *params, *origin, *target, *str;
g_return_if_fail(data != NULL); params = event_get_params(data, 2, &origin, &target);
str = *target == '\0' ? g_strconcat("PONG :", origin, NULL) :
str = g_strdup_printf("PONG %s", data); g_strdup_printf("PONG %s :%s", target, origin);
irc_send_cmd_now(server, str); irc_send_cmd_now(server, str);
g_free(str); g_free(str);
g_free(params);
} }
static void event_empty(void) static void event_empty(void)