Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Don't post duplicate spam report
Browse files Browse the repository at this point in the history
Spam messages were reported twice due to this statement. Removing this if
statement should avoid it, and the report will still be posted anyway.
  • Loading branch information
thomas-daniels committed Feb 18, 2015
1 parent ea0741a commit c81e6a0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Phamhilator.UI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,6 @@ private static void CheckSendReport(Post p, string messageBody, PostAnalysis inf
Message message = null;
Report chatMessage = null;

if (Stats.ReportedUsers.Any(spammer => spammer.Name == p.AuthorName && spammer.Site == p.Site))
{
message = Config.PrimaryRoom.PostMessage("**Spam**" + messageBody);
chatMessage = new Report { Message = message, Post = p, Analysis = info };
}

if (info.Type == PostType.Clean)
{
Stats.PostsCaught++;
Expand Down

2 comments on commit c81e6a0

@ArcticEcho
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this will effectively disable the auto-banning of TP'd spammer names.

@ArcticEcho
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll probably be better to just move this logic into the appropriate post checking class/method(s).

Please sign in to comment.