stats: Add trimset

This commit is contained in:
Hamcha 2016-02-14 00:05:32 +01:00
parent 6ad3dd7ce0
commit dfe2857ae7

View file

@ -318,6 +318,7 @@ func processWords(message tg.APIMessage) {
err := db.Update(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte("words"))
for _, word := range wordList {
word = strings.Trim(word, " ?!.,:;/-_()[]{}'\"+=*^\n")
count, ok := words[word]
if !ok {
count = make(UserCount)