since i won't advertise racism replace word 1 - 9 with common racist words (You can add more if you wish)
this can also be used to make a swear filter :).
on *:TEXT:*:#: {
if ($me isop #) {
if ($nick !isop $chan) && ($regex($1-,/(word1|word2|word3|word4|word5|word6|word 7|word8|Word9)/g)) {
kick $chan $nick | msg $chan --> $nick $+ , We don't support racism here be gone >(
}
}
}
That's when the $& aka line break identifier comes in handy:
var %w = /word1|word2|word3|word4|word5|$&
$+ word6|word 7|word8|Word9|...|...|...|...|...|$&
$+ .../iS
if ($regex($1-,%w)) {
this allows you to break up a long line of code into the next one and so on...
The downside is that $& cannot apply to on text regex. ^^ I'm fairly certain that you can do it through the $regex() without using a temp variable as shown, but I have yet to give it a whirl.