irc: fix CTCP PING reply when the option irc.ctcp.ping is set to non-empty value

v2.8-utf8proc
Sébastien Helleu 2017-08-23 23:11:11 +02:00
parent 3d8980d91a
commit de9f771674
2 changed files with 16 additions and 2 deletions

View File

@ -39,6 +39,7 @@ Bug fixes::
* api: change type of arguments status/gnutls_rc/sock in hook_connect() callback from string to integer (in scripts)
* api: change type of argument fd in hook_fd() callback from string to integer (in scripts)
* buflist: fix crash in auto-scroll of bar when the buflist item is not the first item in the bar
* irc: fix CTCP PING reply when the option irc.ctcp.ping is set to non-empty value
* relay: fix send of "PART" command in backlog (irc protocol)
* relay: fix parsing of CAP command without arguments in irc protocol, send ACK only if all capabilities received are OK and NAK otherwise (issue #1040)

View File

@ -1084,8 +1084,21 @@ irc_ctcp_recv (struct t_irc_server *server, time_t date, const char *command,
address, arguments + 1, pos_args, reply);
if (!reply || reply[0])
{
irc_ctcp_reply_to_nick (server, command, channel, nick,
arguments + 1, pos_args);
if (reply)
{
decoded_reply = irc_ctcp_replace_variables (server, reply);
if (decoded_reply)
{
irc_ctcp_reply_to_nick (server, command, channel, nick,
arguments + 1, decoded_reply);
free (decoded_reply);
}
}
else
{
irc_ctcp_reply_to_nick (server, command, channel, nick,
arguments + 1, pos_args);
}
}
}
/* CTCP DCC */