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:
commit
bf4cdc99d1
2 changed files with 9 additions and 9 deletions
|
@ -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:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue