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;
|
||||
}
|
||||
|
||||
switch (*line) {
|
||||
case 'n':
|
||||
chr = expand_escape(&line);
|
||||
if (chr == '\r' || chr == '\n') {
|
||||
/* newline .. we need to send another "send text"
|
||||
event to handle it (or actually the text before
|
||||
the newline..) */
|
||||
if (ret != ptr) {
|
||||
*ptr = '\0';
|
||||
signal_emit("send text", 3, ret, server, item);
|
||||
ptr = ret;
|
||||
break;
|
||||
default:
|
||||
chr = expand_escape(&line);
|
||||
if (chr != -1)
|
||||
}
|
||||
} else if (chr != -1) {
|
||||
/* escaping went ok */
|
||||
*ptr++ = chr;
|
||||
else {
|
||||
} else {
|
||||
/* unknown escape, add it as-is */
|
||||
*ptr++ = '\\';
|
||||
*ptr++ = *line;
|
||||
}
|
||||
|
||||
switch (*line) {
|
||||
case 'n':
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user