summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Rodland <andrew@cleverdomain.org>2021-05-23 22:19:28 -0400
committerGitHub <noreply@github.com>2021-05-23 21:19:28 -0500
commit076b2c1c7332e82028811d92a7f7f4b091be0163 (patch)
tree78df005520b7d8e16c987c2ecce7ccaccae516a0
parent7121bb6e823dd6b5507fa892a501fda33104cb68 (diff)
Merge pull request #1457 from arodland/forgiving-ctcp
Be forgiving of a missing ending CTCP delimiter in a truncated message
-rw-r--r--src/common/proto-irc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index cfe76361..c8e44b62 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1259,10 +1259,13 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
text++;
}
len = strlen (text);
- if (text[0] == 1 && text[len - 1] == 1) /* ctcp */
+ if (text[0] == 1) /* ctcp */
{
char *new_pdibuf = NULL;
- text[len - 1] = 0;
+ if (text[len - 1] == 1)
+ {
+ text[len - 1] = 0;
+ }
text++;
if (g_ascii_strncasecmp (text, "ACTION", 6) != 0)
flood_check (nick, ip, serv, sess, 0);