MyBB Community Forums

Full Version: Delete posts from the same IP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, so in the space of a very short time, I have had many, many threads created by unregistered spambots on my mybb 1.6.1 forum (about to upgrade version). They all have the same posting IP. Is there any method or plugin that can delete all these threads/posts by the same posting IP?

Many thanks!
I don't recall seeing anything like this. But the Goodbye Spammer plugin will make the process a lot easier:

http://mods.mybb.com/view/goodbye-spammer
Hi faviouz,

I am able to search for all the posts by a specific IP, but I cannot delete them?

I will try mentioned link, though it may just end up me having to manually delete approximately one thousands threads by hand.
^ deleting a lot of spam posts should be possible by using database queries .. (reference)
Hi ranjani,

That's quite useful for deleting a user that had 10,000 posts, because the server would timeout when trying to prune the user's posts, and have just done it.

Does anyone know the table, and corresponding field name for the IP for each post?

Not sure if the SQL query would look like this:
DELETE FROM mybb_threads WHERE ipaddress IN (1,2,3);
DELETE FROM mybb_posts WHERE ipaddress IN (1,2,3);
There's no IP address column in the mybb_threads or mybb_posts table. However, you can run a few SQL queries first to return the uids of the users with the same specific IP address, and then use those uids to mass delete posts.

SELECT `uid` FROM `mybb_users` WHERE `regip` = "127.0.0.1";

(replace regip with lastip if you want to search for users who used that IP in their last post)

DELETE FROM `mybb_threads` WHERE `uid` IN (1,2,3);

DELETE FROM `mybb_posts` WHERE `uid` IN (1,2,3);

(replace 1,2,3 with the uids that were returned from the first SQL query)
Hi faviouz,

The spam bot was a guest and hence did not have an uid (I confirmed this by querying all tables with the ip).

Therefore, I used the following (solution):
DELETE FROM mybb_posts WHERE ipaddress IN (1,2,3);
(replacing 1,2,3 with the list(s) of ipaddress')

Then I re-built all cache's and rebuilt thread counts and such, and now they (posts/threads) have all been with erased with no trace that the guest ever existed.

Many thanks for your assistance!
Oh, my bad. It actually is available in the mybb_posts table, not in mybb_threads though.
HI,
I did the same thing as said here but i have deleted all posts from a spammer,
by username not by IP, and now in the forum the posts still stay as last posts, on forum view, but they don't exist when you open the forum.

Any advise on this?

I am still using mybb 1.4

Thanks.
(2011-09-02, 07:16 AM)bojris Wrote: [ -> ]I am still using mybb 1.4
We don't support MyBB 1.4 anymore.