Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 11 Apr 2012, 01:55
semprot semprot is offline
 
Join Date: Mar 2010
Real name: Jeremy
Lightbulb I want to share my autoban code

I want to share my autobanning code. If it detects a word on a post, the poster will be banned. I attach the code on "postbit_display_complete" hook. On the code below, i only use strpos() to detect but you can change it to preg_match.

Here is the code

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You can modify & reuse this code on your product
__________________
Best regards,

Jeremy
Reply With Quote
  #2  
Old 11 Apr 2012, 19:22
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Real name: Jarvis
Cool stuff, thanks! If you added it in the mods section, it may be easier for people to find.

-Nick, SEOvB Developer
__________________
vBulletin Services and vBulletin Hosting
Reply With Quote
  #3  
Old 12 Apr 2012, 02:21
semprot semprot is offline
 
Join Date: Mar 2010
Real name: Jeremy
Lightbulb

Originally Posted by SEOvB View Post
Cool stuff, thanks! If you added it in the mods section, it may be easier for people to find.

-Nick, SEOvB Developer
It's still far from publicly shareable mods, no option page yet to input magic words to catch, etc.
I hope someone will reuse this code and make a mod from this
__________________
Best regards,

Jeremy
Reply With Quote
  #4  
Old 12 Apr 2012, 04:57
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
A better idea would be to have it send a PM to the admin (or set userid) when a magic word appears in a post. That way it can be investigated as the magic word in the post might not be in the same context as you would think it should be.
Reply With Quote
  #5  
Old 08 Jun 2012, 12:42
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
I agree with Boofo, and also I think that it might be a better idea to run this on post (if the post is not moderated). That way, the function won't run on every single post every single time, as you have it now. So just move it to a different hook with slight modifications, I guess.

In addition, it might be nice to switch the two conditions in the outer if statement, because checking for whether a usergroup is in a list of two items is a lot faster than checking for a word in a long post.
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Miscellaneous Hacks Share Buttons Bar by BOP5 (Facebook Like, Twitter, Google+1, and more share options) BirdOPrey5 vBulletin 3.8 Add-ons 97 06 Nov 2013 07:31



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:13.

Layout Options | Width: Wide Color: