This is a very simple script that will block private messages containing any words you add to the blocked list. Useful if you get a lot of spam messages containing the same words. All blocked messages will be closed automatically and added to a window called @spam for later review.
If there are any modifications or requests let me know. This was just a real quick script made by request,
; Right click in any channel, pm, or status window and mouse to "PM Blocker"
; All PM's received with the blocked words will be put into a @spam window for viewing and all spam PM's will be automatically closed :)
; You're Welcome -- Resinator
#pmblocker on
on *:TEXT:*:?:{
%spamx = 1
while (%spamx <= $numtok(%blockwords,46)) {
if ($gettok(%blockwords,%spamx,46) isin $1-) {
%spam = $+(<,$nick,>) $1-
window -n @spam
aline @spam %spam
close -m $nick
}
inc %spamx 1
}
unset %spam*
}
#pmblocker end
alias pmblock { set %blockwords $addtok(%blockwords,$$?"Add words to block seperated with periods",46) | echo 4 -a Added Word(s) To Spam Blocker | /enable #pmblocker }
alias pmoff { disable #pmblocker }
alias pmon { enable #pmblocker }
menu channel,query,status {
$iif($group(#pmblocker) == on,$style(1) PM Blocker, $style(0) PM Blocker)
.Turn $iif($group(#pmblocker) == on,OFF,ON) $+ :$iif($group(#pmblocker) == on,$pmoff,$pmon)
.Add Key Words To Blocker:/pmblock
.Delete A Word:/set %blockwords $remtok(%blockwords,$$?"Enter word to delete",0,32) | echo 4 -a Word deleted.
.View Blocked Words:/echo 4 -a Blocked Words: $replace(%blockwords,$chr(46),$chr(44) $chr(32))
}