mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
When /SET expand_escapes was ON, \012 and \015 should be treated as newlines
so that text after them is sent as privmsgs, not as direct commands to server. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2301 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
805f59d9ee
commit
4032addbf9
@ -738,23 +738,29 @@ static char *expand_escapes(const char *line, SERVER_REC *server,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (*line) {
|
chr = expand_escape(&line);
|
||||||
case 'n':
|
if (chr == '\r' || chr == '\n') {
|
||||||
/* newline .. we need to send another "send text"
|
/* newline .. we need to send another "send text"
|
||||||
event to handle it (or actually the text before
|
event to handle it (or actually the text before
|
||||||
the newline..) */
|
the newline..) */
|
||||||
|
if (ret != ptr) {
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
signal_emit("send text", 3, ret, server, item);
|
signal_emit("send text", 3, ret, server, item);
|
||||||
ptr = ret;
|
ptr = ret;
|
||||||
break;
|
}
|
||||||
default:
|
} else if (chr != -1) {
|
||||||
chr = expand_escape(&line);
|
/* escaping went ok */
|
||||||
if (chr != -1)
|
|
||||||
*ptr++ = chr;
|
*ptr++ = chr;
|
||||||
else {
|
} else {
|
||||||
|
/* unknown escape, add it as-is */
|
||||||
*ptr++ = '\\';
|
*ptr++ = '\\';
|
||||||
*ptr++ = *line;
|
*ptr++ = *line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (*line) {
|
||||||
|
case 'n':
|
||||||
|
break;
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user