News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Limit to PM's Sent at One Time

Started by Danny, March 15, 2005, 05:30:13 PM

Previous topic - Next topic

Danny

I am an administrator at the hxxp:forum.msi.com.tw/ [nonactive] and we recently had an incident where a new user spammed a large number of members using private messages. It would be nice to have a feature where you could set the max. number of PM's and BCC's that could be sent at one time by user group.

For example, if a Newbie was set to a limit of 2 and wanted to spam 200 people, he would need to do it 50 times.

Another feature which would be nice to go along with this is a setting of the minimum time between PM's, again based on user group. Since spammers tend to be newbies, limiting the amount of trouble they cause before getting caught would be useful.

Thanks for reading,
Danny

[Unknown]

Quote from: Danny on March 15, 2005, 05:30:13 PM
I am an administrator at the MSI HQ forum and we recently had an incident where a new user spammed a large number of members using private messages. It would be nice to have a feature where you could set the max. number of PM's and BCC's that could be sent at one time by user group.

For example, if a Newbie was set to a limit of 2 and wanted to spam 200 people, he would need to do it 50 times.

Subs-Post.php, find:

// Combine 'to' and 'bcc' recipients.
$all_to = array_merge($recipients['to'], $recipients['bcc']);


Replace:

// Combine 'to' and 'bcc' recipients.
$all_to = array_merge($recipients['to'], $recipients['bcc']);

// Check to make sure they're not sending too many pms at once!
if (count($all_to) > 5 && !allowedTo('admin_forum'))
fatal_error('We\'re sorry, but you can only send a pm to five people at once.  Please go back and try again.', false);


This could be made more elegant, but the above is a nice quick fix to prevent it from happening again.  In common usage, a pm will never be sent to more than 5 people accept by administrators.

How do I modify files?

QuoteAnother feature which would be nice to go along with this is a setting of the minimum time between PM's, again based on user group.

Well, it's not based on the group but there is a setting - shared between posts and pms - that prevents spamming.  It's in Edit Features and Options.

-[Unknown]

opally

Hello.

I did some searching around and found this nice code edit for Subs-Post.php.

I'd like to add this limit to my 1.0.7 SMF forum, but would like to exclude administrators and moderators.

I'm trying this modification to the code supplied above. I created a test account and made it a global moderator, but it is not permitted to send private messages to more than one recipient. There's a problem with the logic, because the test account which I set to "global moderator" cannot send a PM to more than one member.


if (count($all_to) > 1 && (!allowedTo('admin_forum') || !allowedTo('moderate_forum') || !allowedTo('manage_boards')))


Is there one permission set that I should use, that covers what I seek? I don't know enough about how the SMF permission heirarchy works.

Are admin_forum, moderate_forum, and manage_boards exclusive or inclusive? If they are inclusive, how?

I just want to make the restriction not apply to administrator, global moderator, or forum moderators.

thanks in advance.

BigMike

opally,

This is a standard feature in my 1.1 RC3.

BigMike

Lamonster

I had a gay porn guy spam all my members through PM's and I was glad to see this new feature in 1.1. Good job!

Advertisement: