From 60aa9b2dfe8bfbc7723c61a5558eca65572d7750 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 24 Jul 2018 15:04:19 +0200 Subject: reduce response length to 450 chars --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 021f075..9381b5a 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ var ( Build string ) -const maxLen = 500 +const maxLen = 450 type Notify struct { conn *irc.Conn @@ -30,7 +30,7 @@ func NewNotify(conn *irc.Conn, target string) *Notify { func limit(n int, s string) string { r := []rune(s) if sz := len(r); sz > n { - r = append(r[:n], []rune("...")...) + r = append(r[:n-3], []rune("...")...) } return string(r) } -- cgit v1.2.3