diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-10-09 14:24:16 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-10-09 14:24:16 +0200 |
commit | 34e0e4476d5e8902e8cad9c90af5dfe630662a65 (patch) | |
tree | 18a3e9c9ac8238ee8a63d9fed95e321b4da1a9a5 /flood.go | |
parent | 60ecd0675282d2688c3300bd42c3ad7c85489c5b (diff) |
Simplify interface
Diffstat (limited to 'flood.go')
-rw-r--r-- | flood.go | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -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") - } -} |