MyBB Community Forums
[How To?] Delete posts from the same IP - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [How To?] Delete posts from the same IP (/thread-100982.html)



Delete posts from the same IP - NullZero - 2011-08-06

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!


RE: Delete posts from the same IP - faviouz - 2011-08-06

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


RE: Delete posts from the same IP - NullZero - 2011-08-06

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.


RE: Delete posts from the same IP - ranjani - 2011-08-06

^ deleting a lot of spam posts should be possible by using database queries .. (reference)


RE: Delete posts from the same IP - NullZero - 2011-08-06

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);



RE: Delete posts from the same IP - faviouz - 2011-08-06

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)


RE: Delete posts from the same IP - NullZero - 2011-08-06

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!


RE: Delete posts from the same IP - faviouz - 2011-08-06

Oh, my bad. It actually is available in the mybb_posts table, not in mybb_threads though.


RE: Delete posts from the same IP - bojris - 2011-09-02

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.


RE: Delete posts from the same IP - StefanT - 2011-09-02

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