if ($nick == isop #) return
isop is operator just like == (equal to)
Your expression reads: If nick is equal to is operator on channel.
Should be if (v1 operator v2) you have if (v1 operator operator v2)
Should be: If nick is operator on channel.
So you use: if ($nick isop #) return
if ($read(blacklist.txt, n, $1-))
This will always return the first line of blacklist.txt
You would need s switch as well.
This approach however will work only if people talk in single words and not sentences.
Also your conditional block is not formatted right.
IF (condition) {
commands
}
on *:TEXT:*:#: {
if ($nick isop #) return
var %i = 1
while (%i <= $lines(blacklist.txt)) {
if ($read(blacklist.txt, %i) isin $1-) {
msg # $nick --> Do not use Blacklisted Words. (Timeout)
msg # .timeout $nick 600
halt
}
inc %i
}
}
-
Just a sidenote. Im sure some people would probably disagree with me or at least fight over right and wrong but personally I would try to avoid reading a file from disk every time someone says something on a channel.
-