@@ -711,7 +711,10 @@ static int gotnotice(char *from, char *msg)
*p = 0;
strlcpy(ctcpbuf, p1, sizeof(ctcpbuf));
ctcp = ctcpbuf;
- strcpy(p1 - 1, p + 1);
+
+ /* remove the ctcp in msg */
+ memmove(p1 - 1, p + 1, strlen(p + 1) + 1);
if (!ignoring)
detect_flood(nick, uhost, from, FLOOD_CTCP);
p = strchr(ctcpmsg, 1);