Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Limit PMs Sent Per-Day Details »»
Limit PMs Sent Per-Day
Version: 1.10, by Sim9 Sim9 is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Category: Private Messages Enhancements - Version: 3.6.4 Rating:
Released: 05-25-2007 Last Update: 02-25-2008 Installs: 20
Uses Plugins
 
No support by the author.

Description:
Very simple modification to limit the number of private messages sent per day. Useful to significantly limit damage spambots can do whilest not annoying users.

Installation:
  1. Download product XML (attached).
  2. Optional: Edit the XML to change the configuration variables section to your liking (sorry, no fancy frontend to the tweaks )
  3. Upload the product XML: In your AdminCP: Plugins & Products >> Manage Products >> [Add/Import Product] >> Upload.
  4. Optional: Edit the phrase 'archivepm_limitexceed' if you want to change it from its default.
  5. Test private messaging and limits.
More information on configuration variables:
These are the configuration variables you're interested in:
$arc_limit = 5; // How many PMs in a time period
$arc_timeperiod_secs = 60 * 60 * 24; // How long (One Day)
$arc_exempt_postcount = 50; // How many forum posts until user is considered exempt from this
This configuration reads as "Limit users who have less than 50 posts to making no more than 5 PMs within 24 hours." Tweak to your liking.

Version 1.1 Released (2/25/08):
I've released a small change which correctly handles automated welcome PMs. Special thanks to Adwade for testing & the donation

Boring Legal Disclaimer:

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-10-2007, 05:45 PM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sim9
This configuration reads as "Limit users who have less than 50 posts to making no more than 5 PMs within 24 hours." Tweak to your liking.
Any chance of a similar mod so that it's usergroup based?
ie: registered users get 15 PMs per day, premium users get unlimited PMs per day.
Reply With Quote
  #13  
Old 08-07-2007, 02:06 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a cool mod. I'd like to add to it the functionality of sending me a PM when someone in the "waiting period" attempts to send more than X PM per day. I am able to send and receive the alert. But it also gives me a database error even though transaction was successful. This is what I included before the closing bracket

PHP Code:
 $pmtitle "Spammer Alert"
                
$pmmessage "A new member, " $vbulletin->userinfo['username'] . " is attempting to send numerous PM. Please verify for possible spammer."
        
$sendtoname="Lionel";
        
// create the DM to do error checking and insert the new PM
        
$botpermissions['adminpermissions'] = 2;  
        
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
        
$pmdm->set('fromuserid'$vbulletin->userinfo['userid']);
        
$pmdm->set('fromusername'$vbulletin->userinfo['username']);
        
$pmdm->set('title'$pmtitle);
        
$pmdm->set('message'$pmmessage);
        
$pmdm->set_recipients($sendtoname$botpermissions);
        
$pmdm->set('dateline'TIMENOW 5);  
        
// If no errors, save.
        
if ($pmdm->errors) {
            return 
$pmdm->errors;
        }
        
$pmdm->save(); 
Like I said, transaction is fine but the next page is about a duplicate entry. Do you still save the blocked PM ?

Quote:
MySQL Error : Duplicate entry '25031' for key 1
Error Number : 1062
Reply With Quote
  #14  
Old 09-19-2007, 11:31 PM
JadedSouls's Avatar
JadedSouls JadedSouls is offline
 
Join Date: May 2007
Location: Canada, eh?
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like!
*installed*
Reply With Quote
  #15  
Old 02-11-2008, 12:55 PM
qdin's Avatar
qdin qdin is offline
 
Join Date: Nov 2006
Location: Istanbul
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx it works fine with 3.6.8
Reply With Quote
  #16  
Old 02-17-2008, 12:04 PM
qdin's Avatar
qdin qdin is offline
 
Join Date: Nov 2006
Location: Istanbul
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a bug with this hack guys. I installed it 1 week ago. But unfortunately when my guests try to register the result of the register is a blank page. And the Error is like that

Code:
Fatal error: Call to a member function query_read() on a non-object in
/var/www/vhosts/******.net/httpdocs/forum/includes/class_dm_user.php(2449) : eval()'d code on line 13
When I disable this hack everything works fine. Could anyone find the problem :S I am not a good coder :S

P:S. the version of my board is 3.6.8
Reply With Quote
  #17  
Old 02-17-2008, 07:38 PM
Sim9's Avatar
Sim9 Sim9 is offline
 
Join Date: Mar 2005
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Konstantinos/criscokid - if you're interested in usergroup permissions, this is the line to change:
Code:
if ($vbulletin->userinfo['posts'] < $arc_exempt_postcount)
Off the top of my head, I'm not sure what the check usergroup code is, but you could change that condition to check for it. Should only be a one line change

Lionel - I like the idea of warning an admin about PM spam, but you wouldn't want to send one warning per attempt or your inbox would be badly spammed. I'm guessing that the reason you can't send a pm at that time is that another PM (the user's) is being constructed at that time. Maybe try erroring out and clearing the user's PM first, then send the admin pm (being sure to initialize a fresh PM with a unique ID)?

qdin, are you running a PM member on register plugin? It's possible this plugin is not compatible with that, though it runs fine on my board with other automated PMs (though I don't have a registration PM). Try sending automated PMs from a user account with a postcount higher than the spam check postcount
Reply With Quote
  #18  
Old 02-23-2008, 01:03 AM
adwade adwade is offline
 
Join Date: Aug 2006
Location: SouthEast, TN
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One other question, not being a 'coder' I guess this

Code:
$arc_timeperiod_secs = 60 * 60 * 24; // How long (One Day)
is probably what controls the 60 second new posting delay? If one wanted to make the forced delay between postings 120secs (instead of 1min) would you change one of the 60's above, and if so which one?

Update: Nevermind, I found Private Messaging Options in AdminCP that controls the delay between sending PMs!

INSTALLED!
Reply With Quote
  #19  
Old 02-23-2008, 02:53 AM
Sim9's Avatar
Sim9 Sim9 is offline
 
Join Date: Mar 2005
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds like you cleared it up, but just so everyone knows the distinction in case all they really need is the stock vB functionality:

Stock vBulletin provides an option to control the timeout between two individual PMs (adwade's post) - this lets you say a normal user can PM no more than once per sixty seconds. With a sixty second delay, a user can potentially send 1,440 privates messages a day (1,440 minutes in a day). Setting this to an hour interval mitigates this down to 24 private messages a day, at the cost of potentially annoying legitimate users who now have to wait a full hour between sending PMs.

This plugin lets you restrict the number of PMs sent over a span of a full day (or whatever other interval you set). So you could set the vBulletin delay between PMs to a negligible five seconds, but only allow five PMs per day for new users. This shouldn't affect legitimate new users, but will significantly limit the damage a spam bot could do.

Hope that makes the plugin clearer
Reply With Quote
  #20  
Old 02-24-2008, 04:44 AM
adwade adwade is offline
 
Join Date: Aug 2006
Location: SouthEast, TN
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm running vB v3.6.4 and when I installed and tested your MOD, everything acted normally until I 'clicked' on the LINK in the verification email sent out when a new user registers. Then, this is what I got:

Code:
Fatal error: Call to a member function on a non-object in /home/*******/public_html/forums/includes/class_dm_user.php(2385) : eval()'d code on line 11
Toggle the MOD OFF and the error went away, whenever I signed up as a new user and clicked the verification LINK in the email. I get the same error using MS-IE or FireFox either one with the MOD Enabled. Any ideas??

EDIT: One other thing I forgot to add, is the Verification LINK actually works, regardless of this error. It's just seeing the Fatal Error vs. the You're Registered Now screen confuses new users.
Reply With Quote
  #21  
Old 02-24-2008, 05:01 AM
adwade adwade is offline
 
Join Date: Aug 2006
Location: SouthEast, TN
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sim9 View Post
qdin, are you running a PM member on register plugin? It's possible this plugin is not compatible with that, though it runs fine on my board with other automated PMs (though I don't have a registration PM). Try sending automated PMs from a user account with a postcount higher than the spam check postcount
FWIW, I'm not. However, I am running Cyb - PM System Enhancements Could that be doing it, when installed alongside your MOD? I disabled it and re-tried signing up as a new user with your MOD enabled and still got the Fatal Error above.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:02 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04781 seconds
  • Memory Usage 2,332KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete