summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-07-24 15:04:19 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-07-24 15:04:19 +0200
commit60aa9b2dfe8bfbc7723c61a5558eca65572d7750 (patch)
tree3a87dfb73e66bee1f56e6f35f69a849446434328
parentb5503bf57a269205bcb6cc035a2ff1603e425755 (diff)
reduce response length to 450 chars
-rw-r--r--main.go4
1 files 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)
}