Remove rate limit check on compiler flag

This commit is contained in:
Joey Yakimowich-Payne 2020-02-18 13:54:04 -07:00 • committed by Andreas Rumpf
commit 91746924dc

View file

@ -434,6 +434,7 @@ proc executeReply(c: TForumData, threadId: int, content: string,
else: else:
raise newForumError("You are not allowed to post") raise newForumError("You are not allowed to post")
when not defined(skipRateLimitCheck):
if rateLimitCheck(c): if rateLimitCheck(c):
raise newForumError("You're posting too fast!") raise newForumError("You're posting too fast!")
@ -567,6 +568,7 @@ proc executeNewThread(c: TForumData, subject, msg, categoryID: string): (int64,
if not validateRst(c, msg): if not validateRst(c, msg):
raise newForumError("Message needs to be valid RST", @["msg"]) raise newForumError("Message needs to be valid RST", @["msg"])
when not defined(skipRateLimitCheck):
if rateLimitCheck(c): if rateLimitCheck(c):
raise newForumError("You're posting too fast!") raise newForumError("You're posting too fast!")