Spam Reduction Mod 0.1 Alpha This mod will not permit a user to post a message that contains a link to an Internet resource unless the user: 1. is registered; 2. has been registered for 30 days; and 3. has posted at least 10 message. If you wish to change these permameters, then go to Settings.pl and change the amounts associated with the following variables $Spam_Days_Req and $Spam_Mes_Req to the desired numbers. I do not expect this version to be completely fool-proof. I will post an update when it has been fine-tuned. The Mod uses the existing sub calcdifference which assumes all months have 30 days. Therefore, the calculation of days may be off by a bit. Created for 1.3.2 of YABB Mr. George A. Wowk http://www.wowk.com Settings.pl ########## Directories/Files ########## $Spam_Days_Req=30; $Spam_Mes_Req=10; Sources/Post.pl ^M
NOTE: Due to excessive spam we had to implement the following restriction. You cannot include a link to a web resource within your message unless you have been registered for at least $Spam_Days_Req days and posted $Spam_Mes_Req times. Sorry for any incovenience. if( $threadid =~ /\D/ ) { &fatal_error($txt{'337'}); } $notify = $FORM{'notify'}; &LoadUser($username); $date2 = $date; $date1 = $userprofile{$username}->[14]; &calcdifference; # returns number of days in $result if ((($username eq 'Guest') || ($userprofile{$username}->[6] < $Spam_Mes_Req) || ($result < $Spam_Days_Req)) && ( $message =~ m~([^\w\"\=\[\]]|[\n\b]|\A)\\*(\w+://[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?{3}/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~ || $message =~ m~[^(?:\://\w+)]([^\"\=\[\]/\:\.]|[\n\b]|\A)\\*(www\.[^\.][\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~ || $message =~ m~\[url\]\s*(\S+?)\s*\[/url\]~ || $message =~ m~\[url\]\s*(\S+?)\s*\[/url\]~ || $message =~ m~\[url\]\s*www\.(\S+?)\s*\[/url\]~ || $message =~ m~\[url=\s*(\S\w+\://\S+?)\s*\](.+?)\[/url\]~ || $message =~ m~\[url=\s*(\S+?)\](.+?)\s*\[/url\]~ || $message =~ m~\[img\]\s*(\S+?)\s*\[/img\]~ || $message =~ m~\[img.*\](.+?)\s*\[/img\]~ || $message =~ m~\[link\]\s*www\.(\S+?)\s*\[/link\]~ || $message =~ m~\[link=\s*(\S\w+\://\S+?)\s*\](.+?)\[/link\]~ || $message =~ m~\[link=\s*(\S+?)\](.+?)\s*\[/link\]~ || $message =~ m~\[link\]\s*(\S+?)\s*\[/link\]~ || $message =~ m~\[email\]\s*(\S+?\@\S+?)\s*\[/email\]~ || $message =~ m~\[email=\s*(\S+?\@\S+?)\](.*?)\[/email\]~ || $message =~ m~\[news\](\S+?)\[/news\]~ || $message =~ m~\[gopher\](\S+?)\[/gopher\]~ || $message =~ m~\[ftp\](\S+?)\[/ftp\]~ )) { &fatal_error($spamtxt{'01'}); } english.lng $txt{'796'} = "Your Instant Messages:"; $spamtxt{'01'} = "Due to excessive spam we have implemented the following restriction.

You may not include links to web resources within your message unless you are a registered user who has been registered for at least $Spam_Days_Req days and have posted at least $Spam_Mes_Req messages.

Please hit the back button on your browser and remove all links to web resources and resubmit your message.

You can still submit as a Guest but you cannot include a link to a web resource.

Sorry for any incovenience.";