summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flood.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/flood.go b/flood.go
index 776a96a..356ab89 100644
--- a/flood.go
+++ b/flood.go
@@ -5,6 +5,7 @@ import (
"math"
"sort"
"strings"
+ "unicode/utf8"
irc "github.com/fluffle/goirc/client"
)
@@ -21,7 +22,7 @@ func Entropy(s string) (e float64) {
}
func Flood(s string) bool {
- if len(s) < 8 {
+ if utf8.RuneCountInString(s) < 4 {
return false
}
if v := strings.Fields(s); len(v) >= 6 {