diff options
author | delthas <delthas@dille.cc> | 2021-07-12 11:43:22 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-07-13 13:40:57 +0200 |
commit | 01c27150b773b578a24096caf5fa618ae3b19aa6 (patch) | |
tree | 58da8b4371b3c4e528c7e338d73d022a383a4f09 /irc/typing.go | |
parent | Sort channel members by name (diff) |
Ratelimit +typing and send +typing=done once only
Diffstat (limited to 'irc/typing.go')
-rw-r--r-- | irc/typing.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/irc/typing.go b/irc/typing.go index 5f028e4..5a3073c 100644 --- a/irc/typing.go +++ b/irc/typing.go @@ -3,6 +3,8 @@ package irc import ( "sync" "time" + + "golang.org/x/time/rate" ) // Typing is an event of Name actively typing in Target. @@ -86,3 +88,9 @@ func (ts *Typings) List(target string) []string { } return res } + +type typingStamp struct { + Last time.Time + Type int + Limit *rate.Limiter +} |