forked from External/ergo
deprecate message truncation
Implements #1577, but the issue should remain open until we clean up the debugging loglines.
This commit is contained in:
parent
6fae02d335
commit
03185ea4a9
12 changed files with 148 additions and 29 deletions
4
vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go
generated
vendored
4
vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go
generated
vendored
|
|
@ -63,6 +63,10 @@ func (cc *IRCReader) ReadLine() ([]byte, error) {
|
|||
line := cc.buf[cc.start : cc.searchFrom+nlidx]
|
||||
cc.start = cc.searchFrom + nlidx + 1
|
||||
cc.searchFrom = cc.start
|
||||
// treat \r\n as the line terminator if it was present
|
||||
if 0 < len(line) && line[len(line)-1] == '\r' {
|
||||
line = line[:len(line)-1]
|
||||
}
|
||||
return line, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue