1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -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)
{
char *str;
char *params, *origin, *target, *str;
g_return_if_fail(data != NULL);
str = g_strdup_printf("PONG %s", data);
params = event_get_params(data, 2, &origin, &target);
str = *target == '\0' ? g_strconcat("PONG :", origin, NULL) :
g_strdup_printf("PONG %s :%s", target, origin);
irc_send_cmd_now(server, str);
g_free(str);
g_free(str);
g_free(params);
}
static void event_empty(void)