ADDWORD Unknown command
got this first time i tried to do anything: here is my edit that still has a minor flaw and repeats the "word is already added"
on *:CONNECT: {
if (!%badwords) { set %badwords put,words,here,seperated,by,commas }
echo -a %badwords has been set {
else { echo -a The badwords have already been set. }
}
}
alias bdwd {
if (!%badwords) { set %badwords put,words,here,seperated,by,commas }
echo -a %badwords has been set {
else { echo -a The badwords have already been set. }
}
}
alias addword {
if (!$1) { echo Please specify something to be added. | halt }
var %i 1
while (%i <= $0) {
if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { echo -a That word or words is already in the list | halt | inc %i }
set %badwords $replace($addtok(%badwords,$1-,32),$chr(32),$chr(44))
echo The new list is --> %badwords
}
}
alias delword {
if (!$1) { echo Please specify something to be removed. | halt }
if (!$istok(%badwords,$1,44)) { echo -a That word is not in the list. | halt }
else {
set %badwords $remtok(%badwords,$1,44)
echo The new list is --> %badwords
}
}
on @:text::#: {
var %i 1
while (%i <= $0) {
if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not use such language in $chan again. | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt | inc %i }
else { halt }
}
}
on @:action::#: {
var %i 1
while (%i <= $0) {
if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not emote such language in $chan again. | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt | inc %i }
else { halt }
}
}
on @:notice::#: {
var %i 1
while (%i <= $0) {
if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not notice such language in $chan again. | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt | inc %i }
else { halt }
}
}