summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-04 00:24:34 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-04 01:11:27 +0200
commit2e20ec0ef6a87342a02d90aa73d8daadf478fa0b (patch)
treef384011502451b5aa8838f845c02fd107094f99f /common.c
parent7de13094210537ea2cc290e57481c2408e285565 (diff)
downloadxK-2e20ec0ef6a87342a02d90aa73d8daadf478fa0b.tar.gz
xK-2e20ec0ef6a87342a02d90aa73d8daadf478fa0b.tar.xz
xK-2e20ec0ef6a87342a02d90aa73d8daadf478fa0b.zip
degesch: get real with the CTCP
Diffstat (limited to 'common.c')
-rw-r--r--common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common.c b/common.c
index 7b845d8..951055c 100644
--- a/common.c
+++ b/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);
}