degesch: get real with the CTCP
This commit is contained in:
parent
7de1309421
commit
2e20ec0ef6
7
common.c
7
common.c
|
@ -924,7 +924,7 @@ ctcp_parse (const char *message)
|
|||
if (my_is_ctcp)
|
||||
ctcp_parse_tagged (m.str + my_start, i - my_start, chunk);
|
||||
else
|
||||
ctcp_intra_decode (m.str + my_start, i - my_start, &chunk->text);
|
||||
str_append_data (&chunk->text, m.str + my_start, i - my_start);
|
||||
LIST_APPEND_WITH_TAIL (result, result_tail, chunk);
|
||||
}
|
||||
|
||||
|
@ -933,7 +933,10 @@ ctcp_parse (const char *message)
|
|||
if (!in_ctcp && start != m.len)
|
||||
{
|
||||
struct ctcp_chunk *chunk = ctcp_chunk_new ();
|
||||
ctcp_intra_decode (m.str + start, m.len - start, &chunk->text);
|
||||
// According to the original CTCP specification we should use
|
||||
// ctcp_intra_decode() but no one seems to use that and it breaks
|
||||
// normal text with backslashes
|
||||
str_append_data (&chunk->text, m.str + start, m.len - start);
|
||||
LIST_APPEND_WITH_TAIL (result, result_tail, chunk);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue