Skip to content

Commit

Permalink
Only reset idle on channel messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rcy committed Sep 23, 2023
1 parent b2a0159 commit 3d47ef3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bot/irc.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ on conflict(channel, nick) do update set updated_at = current_timestamp, present
})
bot.Conn.AddCallback("366", func(e *irc.Event) {})
bot.Conn.AddCallback("PRIVMSG", func(e *irc.Event) {
bot.resetIdle()
if e.Arguments[0] == channel {
bot.resetIdle()
}
go bot.RunHandlers(e)
})
bot.Conn.AddCallback("JOIN", func(e *irc.Event) {
Expand Down

0 comments on commit 3d47ef3

Please sign in to comment.