1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-07-01 02:53:53 +00:00

Merge branch 'master' of github.com:fluffle/goirc

Conflicts:
	client/commands.go
This commit is contained in:
Alex Bramley 2015-04-15 22:31:12 +01:00
commit bf4cdc99d1
2 changed files with 9 additions and 9 deletions

View file

@ -65,13 +65,13 @@ func indexFragment(s string) int {
// 3. splitLen itself
func splitMessage(msg string, splitLen int) (msgs []string) {
// This is quite short ;-)
if splitLen < 10 {
if splitLen < 13 {
splitLen = defaultSplit
}
for len(msg) > splitLen {
idx := indexFragment(msg[:splitLen])
idx := indexFragment(msg[:splitLen-3])
if idx < 0 {
idx = splitLen
idx = splitLen - 3
}
msgs = append(msgs, msg[:idx] + "...")
msg = msg[idx:]