summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-02-18 18:31:19 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-02-18 18:31:19 +0100
commit67838983adecd9b20ba862e85c8acd3bc04f3f11 (patch)
tree8e5fcacce4277003f3903134507b6e47c8db7464 /src/plugins/irc/irc-protocol.c
parent4e4fd3f54d8fcd4aaf95f3aac5357d93de7ea2ff (diff)
downloadweechat-67838983adecd9b20ba862e85c8acd3bc04f3f11.zip
irc: fix display of malformed CTCP (without closing char) (bug #38347)
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r--src/plugins/irc/irc-protocol.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 8252830db..260aa74f2 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -1084,8 +1084,7 @@ IRC_PROTOCOL_CALLBACK(notice)
pos_args = (argv_eol[2][0] == ':') ? argv_eol[2] + 1 : argv_eol[2];
}
- if (nick && (pos_args[0] == '\01')
- && (pos_args[strlen (pos_args) - 1] == '\01'))
+ if (nick && (pos_args[0] == '\01'))
{
irc_ctcp_display_reply_from_nick (server, date, command, nick, pos_args);
}
@@ -1543,8 +1542,7 @@ IRC_PROTOCOL_CALLBACK(privmsg)
irc_channel_join_smart_filtered_unmask (ptr_channel, nick);
/* CTCP to channel */
- if ((pos_args[0] == '\01')
- && (pos_args[strlen (pos_args) - 1] == '\01'))
+ if (pos_args[0] == '\01')
{
irc_ctcp_recv (server, date, command, ptr_channel,
address, nick, NULL, pos_args,
@@ -1612,8 +1610,7 @@ IRC_PROTOCOL_CALLBACK(privmsg)
remote_nick = (nick_is_me) ? pos_target : nick;
/* CTCP to user */
- if ((pos_args[0] == '\01')
- && (pos_args[strlen (pos_args) - 1] == '\01'))
+ if (pos_args[0] == '\01')
{
irc_ctcp_recv (server, date, command, NULL,
address, nick, remote_nick, pos_args,