dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit c87286a3023309016a097fa237d1cc7c189f7eeb
parent 214a2979cfd44c7007b4ee3de54a0bd0432345cb
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun,  4 Dec 2022 19:18:46 -0500

more kick for retard new accounts

Diffstat:
Mpkg/web/handlers/api/v1/spamInterceptor.go | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/pkg/web/handlers/api/v1/spamInterceptor.go b/pkg/web/handlers/api/v1/spamInterceptor.go @@ -51,6 +51,12 @@ func checkSpam(origMessage string, authUser *database.User) error { return ErrSpamFilterTriggered } } + if authUser.GeneralMessagesCount < 20 || time.Since(authUser.CreatedAt) < 5*time.Hour { + if strings.Contains(lowerCaseMessage, "cp link") { + silentKick(authUser) + return ErrSpamFilterTriggered + } + } if strings.Contains(lowerCaseMessage, "#dorkforest") { if authUser.IsModerator() {