From 91746924dc8db2f05dee4bf9c107d35d4fbaaf40 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Tue, 18 Feb 2020 13:54:04 -0700 Subject: [PATCH] Remove rate limit check on compiler flag --- src/forum.nim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/forum.nim b/src/forum.nim index bc25b7b..aee5ad4 100644 --- a/src/forum.nim +++ b/src/forum.nim @@ -434,8 +434,9 @@ proc executeReply(c: TForumData, threadId: int, content: string, else: raise newForumError("You are not allowed to post") - if rateLimitCheck(c): - raise newForumError("You're posting too fast!") + when not defined(skipRateLimitCheck): + if rateLimitCheck(c): + raise newForumError("You're posting too fast!") if content.strip().len == 0: raise newForumError("Message cannot be empty") @@ -567,8 +568,9 @@ proc executeNewThread(c: TForumData, subject, msg, categoryID: string): (int64, if not validateRst(c, msg): raise newForumError("Message needs to be valid RST", @["msg"]) - if rateLimitCheck(c): - raise newForumError("You're posting too fast!") + when not defined(skipRateLimitCheck): + if rateLimitCheck(c): + raise newForumError("You're posting too fast!") result[0] = tryInsertID(db, query, subject, categoryID).int if result[0] < 0: