From 92612d74cdbdd96b097564f8d11fce21cce1bd8e Mon Sep 17 00:00:00 2001 From: Hamcha Date: Sun, 14 Feb 2016 00:07:17 +0100 Subject: [PATCH] stats: Accidentally removed the length check.. oops --- stats/stats.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stats/stats.go b/stats/stats.go index 0a2b149..1445b31 100644 --- a/stats/stats.go +++ b/stats/stats.go @@ -318,6 +318,10 @@ func processWords(message tg.APIMessage) { err := db.Update(func(tx *bolt.Tx) error { b := tx.Bucket([]byte("words")) for _, word := range wordList { + if len(word) < 3 { + return + } + word = strings.Trim(word, " ?!.,:;/-_()[]{}'\"+=*^\n") count, ok := words[word] if !ok {