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:
parent
117f27eb92
commit
93061dd48f
@ -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(params);
|
||||
}
|
||||
|
||||
static void event_empty(void)
|
||||
|
Loading…
Reference in New Issue
Block a user