A pretty simple PM filter I made while bored. Go to the Menubar and you'll see the Filter options etc. Everything else is self explanatory from there. Feedback is highly appreciated.
#Blockspam On
ON ^*:OPEN:?: {
if ($read(Filterwords.txt) iswm $1-) {
ignore -u60 $nick
notice $nick Ignored. Please stop spamming my Private Messages.
}
elseif ($readini(filter.ini,blockeduser,$nick) == enemy) {
msg $nick You are marked as a blocked nick. This Private Message is being closed.
close -m $nick
}
haltdef
}
on ^*:TEXT:*:?:{
if ($read(Filterwords.txt) iswm $1-) {
ignore -u60 $nick
notice $nick Ignored. Please stop spamming my Private Messages.
}
}
#Blockspam End
Menu Menubar {
Enable Spamfilter:enable #blockspam
Disable Spamfilter:disable #blockspam
Filter Options:
.Block a nick:writeini Filter.ini Blockeduser $$?="Enter blocked nick:" enemy
.Remove blocked nick:remini Filter.ini Blockeduser $$?="Enter removed nick:" $1-
.-
.Add a word:abword
.Delete a word:rbword
}
alias rbword {
if ($read(filterwords.txt) == $null) { halt }
write -ds filterwords.txt $$?="Enter removed word:"
}
alias abword {
write Filterwords.txt $?="Enter blocked word:"
}