Switch stripansi() to stripansicodes() in the CTCP reply parser.
stripansi() actually just munged control-characters, so it just turned ANSI codes into visible junk. stripansicodes() instead leaves control characters alone but removes complete ANSI sequences from the string. I'm not sure if even that is necessary, really - after all, we always allowed ^B, ^C etc style formatting in CTCP replies.
This commit is contained in:
@@ -1323,7 +1323,6 @@ extern char *do_notice_ctcp (char *from, char *to, char *str)
|
|||||||
*ctcp_argument;
|
*ctcp_argument;
|
||||||
int i;
|
int i;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char *tbuf = NULL;
|
|
||||||
int allow_ctcp_reply = 1;
|
int allow_ctcp_reply = 1;
|
||||||
|
|
||||||
#ifdef WANT_DLL
|
#ifdef WANT_DLL
|
||||||
@@ -1341,9 +1340,7 @@ extern char *do_notice_ctcp (char *from, char *to, char *str)
|
|||||||
if (!in_ctcp_flag)
|
if (!in_ctcp_flag)
|
||||||
in_ctcp_flag = -1;
|
in_ctcp_flag = -1;
|
||||||
|
|
||||||
tbuf = stripansi(str);
|
strlcpy(local_ctcp_buffer, stripansicodes(str), sizeof local_ctcp_buffer - 2);
|
||||||
strlcpy(local_ctcp_buffer, tbuf, sizeof local_ctcp_buffer - 2);
|
|
||||||
new_free(&tbuf);
|
|
||||||
|
|
||||||
for (;;strlcat(local_ctcp_buffer, last, sizeof local_ctcp_buffer - 2))
|
for (;;strlcat(local_ctcp_buffer, last, sizeof local_ctcp_buffer - 2))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user