summaryrefslogtreecommitdiff
path: root/flood.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-10-09 14:24:16 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-10-09 14:24:16 +0200
commit34e0e4476d5e8902e8cad9c90af5dfe630662a65 (patch)
tree18a3e9c9ac8238ee8a63d9fed95e321b4da1a9a5 /flood.go
parent60ecd0675282d2688c3300bd42c3ad7c85489c5b (diff)
Simplify interface
Diffstat (limited to 'flood.go')
-rw-r--r--flood.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/flood.go b/flood.go
index 986a85c..c9865ed 100644
--- a/flood.go
+++ b/flood.go
@@ -1,13 +1,10 @@
package main
import (
- "log"
"math"
"sort"
"strings"
"unicode/utf8"
-
- irc "github.com/fluffle/goirc/client"
)
func entropy(s string) (e float64) {
@@ -43,10 +40,3 @@ func commonWord(v []string) int {
sort.Sort(sort.Reverse(sort.IntSlice(l)))
return l[0]
}
-
-func DetectFlood(conn *irc.Conn, line *irc.Line) {
- if isFlood(line.Text()) {
- log.Println("flood", line.Nick)
- conn.Kick(*room, line.Nick, "flood")
- }
-}