Fixes #74.
This commit is contained in:
parent
6bded9791e
commit
54993195b2
1 changed files with 10 additions and 1 deletions
11
forum.nim
11
forum.nim
|
|
@ -552,12 +552,21 @@ proc spamCheck(c: var TForumData, subject, content: string): bool =
|
||||||
for i in subject:
|
for i in subject:
|
||||||
if i in Letters:
|
if i in Letters:
|
||||||
subjAlphabet.add(i)
|
subjAlphabet.add(i)
|
||||||
|
case i
|
||||||
|
of '!':
|
||||||
|
subjAlphabet.add("i")
|
||||||
|
else: discard
|
||||||
var contentAlphabet = ""
|
var contentAlphabet = ""
|
||||||
for i in content:
|
for i in content:
|
||||||
if i in Letters:
|
if i in Letters:
|
||||||
contentAlphabet.add(i)
|
contentAlphabet.add(i)
|
||||||
|
case i
|
||||||
|
of '!':
|
||||||
|
subjAlphabet.add("i")
|
||||||
|
else: discard
|
||||||
|
|
||||||
for word in ["appliance", "kitchen", "cheap", "sale"]:
|
for word in ["appliance", "kitchen", "cheap", "sale", "relocating",
|
||||||
|
"packers", "lenders", "fifa", "coins"]:
|
||||||
if word in subjAlphabet.toLower() or word in contentAlphabet.toLower():
|
if word in subjAlphabet.toLower() or word in contentAlphabet.toLower():
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue