I have a problem with my addon...it just doesn't want to punish "#". I'll explain it clearly
When I add a spamword like these : "#usa , #germany , etc " everything is all right when I got the message "Please join #usa , #germany ..."
But when I add only "#" as a spamword, because I want all #channels to be ignored by my addon, it just does't work
So I was wondering...could you help me
code:
==================================================
};Anti Spam
#spamdetect on
on *:open:?:*:{
if (%total-spam == $null) { set %total-spam 0 }
var %i = 1
while (%i <= $lines(spamwords.txt)) {
if ($read(spamwords.txt,%i) isin $strip($1-)) {
inc %total-spam 1
.notice $nick 12Za takiva Spammeri kato tebe si imam Spam Protections %logo !!!
echo < $+ $nick $+ > $1-
close -m $nick
halt
}
inc %i 1
}
}
#spamdetect end
Menu channel {
Anti-Spam
.on/off (now| %spamonoff $+ ) :{
if (%spamonoff == on) { spamoff }
else { spamon }
}
.Add Spam Word:dialog -m spamdetect spamdetect
}
dialog spamdetect {
title "Anti-Spam"
size -1 -1 100 149
option dbu
list 1, 4 55 94 77, sort size
edit "", 2, 4 44 71 10
button "Add", 3, 76 44 21 10, default
radio "On", 4, 21 20 15 10, push
radio "Off", 5, 54 20 15 10, push
box "Spam Words", 6, 1 35 100 113
box "", 7, 1 -1 100 36
button "Remove", 8, 5 133 92 12
button "!", 10, 3 4 9 9, hide cancel
}
alias spamon { set %spamonoff on | .enable #spamdetect | }
alias spamoff { set %spamonoff off | .disable #spamdetect | }
on *:dialog:spamdetect:sclick:4:spamon
on *:dialog:spamdetect:sclick:5:spamoff
on *:dialog:spamdetect:sclick:8:write -ds" $+ $did(1).seltext $+ " spamwords.txt | did -r $dname 1 | loadbuf 0 -o spamdetect 1 spamwords.txt
on *:dialog:spamdetect:init:0:loadbuf 0 -o spamdetect 1 spamwords.txt | if (%spamonoff == on) { did -c $dname 4 } | else { did -c $dname 5 }
on *:dialog:spamdetect:sclick:3:did -r $dname 1 | write spamwords.txt $did(2) | did -r $dname 2 | loadbuf 0 -o spamdetect 1 spamwords.txt
on *:dialog:spamdetect:sclick:9:splay spam.mp3 | showspamabout
on *:dialog:spamdetect:sclick:12:hidespamabout
alias showspamabout {
did -v spamdetect 12
did -h spamdetect 1
did -h spamdetect 2
did -h spamdetect 3
did -h spamdetect 4
did -h spamdetect 5
did -h spamdetect 6
did -h spamdetect 7
did -h spamdetect 8
did -h spamdetect 9
}
alias hidespamabout {
did -h spamdetect 12
did -v spamdetect 1
did -v spamdetect 2
did -v spamdetect 3
did -v spamdetect 4
did -v spamdetect 5
did -v spamdetect 6
did -v spamdetect 7
did -v spamdetect 8
did -v spamdetect 9
}