From 902245e5bc0e1f95f52cb954cec12bba64e1fd95 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Sun, 14 Feb 2016 00:14:51 +0100 Subject: [PATCH] stats: Filter links from dictionary --- stats/stats.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stats/stats.go b/stats/stats.go index d76eef3..963f317 100644 --- a/stats/stats.go +++ b/stats/stats.go @@ -322,6 +322,12 @@ func processWords(message tg.APIMessage) { continue } + word = strings.ToLower(word) + + if strings.HasPrefix(word, "http") { + continue + } + word = strings.Trim(word, " ?!.,:;/-_()[]{}'\"+=*^\n") count, ok := words[word] if !ok {