summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index e2fd650..c884fe5 100644
--- a/main.go
+++ b/main.go
@@ -5,6 +5,7 @@ import (
"fmt"
"log"
"strings"
+ "time"
irc "github.com/fluffle/goirc/client"
)
@@ -40,6 +41,7 @@ func kicker(conn *irc.Conn, channel string) chan string {
func privmsg(note, kick chan string) irc.HandlerFunc {
last := NewLast(10)
links := linker(note)
+ wl := NewWatchList(3, 5*time.Second)
return func(conn *irc.Conn, line *irc.Line) {
switch t := line.Text(); {
case isFlood(t):
@@ -59,6 +61,7 @@ func privmsg(note, kick chan string) irc.HandlerFunc {
default:
links <- t
last.Push(line.Time, line.Nick, t)
+ wl.Add(kick, line.Nick)
}
}
}