Author Topic: Stop Forum Spam  (Read 246 times)

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4739
  • Have you played my board game?
    • Rival Troops
Stop Forum Spam
« on: December 28, 2021, 15:32:17 »
Using the add-ons for StopForumSpam are nice, but it still leaves a lot of manual management of the flagged accounts. For anyone else using the same thing, here's a string of SQL queries that will help find and remove a majority of the ones that I've found to be the biggest problem. Although StopForumSpam flags users based names alone, I've found that can lead to falsely flagging valid users, simply based on common usernames. Managing members awaiting approval should be manageable after running this. 

Code: [Select]
select * from smf_members where is_spammer > 4 and id_member > 1;
#delete from smf_members where is_spammer > 4 and id_member > 1;
SET @BADIP = 1, @BADUSERNAME = 2, @BADUSERNAMEANDIP = 3, @BADEMAIL = 4;
SET @BADEMAILANDIP = 5, @BADEMAILANDUSERNAME = 6, @BADEMAILANDUSERNAMEANDIP = 7;
#delete from smf_members where is_spammer IN (@BADIP, @BADUSERNAMEANDIP, @BADEMAIL) and id_member > 1;
SELECT is_spammer, id_member, member_name, email_address, member_ip
FROM smf_members where is_spammer = @BADUSERNAME;
SELECT is_spammer, id_member, member_name, email_address, member_ip
FROM smf_members where is_spammer IN (@BADIP, @BADUSERNAMEANDIP, @BADEMAIL);
SELECT is_spammer, id_member, member_name, email_address, member_ip FROM smf_members where is_spammer > 4;

Delete lines are commented out in case it's the first time running it. Run those when you've verified that you've found the right records to remove.
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)