;
; Tried to clean this up a bit, and explain what I've done. I've commented and attempted
; color coding to make it more legible. For the first change, you have ifs comparing the
; channel name. This can be resolved by adding it to the event call. The ,? means include
; queries. Seperate more channels or destinations with commas (,).
;
on ^*:TEXT:*:[color:blue]#IdleRPG,?[/color]: {
;
; First, we use $target instead of checking for a nick or channel. Next, use regular
; expressions to match the words. Add each word to the below regular expressions in
; the parenthesis, but divided by a pipe (|) as I have done. Feel free to add more
; %term_N's, but make sure to add another If statement for them!
;
var %term_1 = /([color:blue]quis|quie|quic|quir|quit|squi|quid|quiz|quiz|equi|quin|quil|xqui|nqui|quiv|quip|quike[/color])/i
var %term_2 = /([color:blue]brim|brie|brin|brit|brig|bric|brid|brib|abri|bril|bris|brio|bria|briana[/color])/i
;
; Match the qui one first
;
if ($regex($1-,%term_1)) {
;
; Here, i got a little confused. You have an IF in an echo line. I assumed
; it fell under the echo, as another condition? What i assumed was the echo
; with '0' (white) color was the highlight, so I used it below. The echo
; (that i assumed was default) has no color, and is in the last else statement.
; Again, we use $target to remove the first if statement you included.
;
echo [color:blue]0[/color] -mt [color:blue]$target[/color] < $+ $nick $+ > $$1-
;
; I'm not sure what the other else is for. If it's important, feel free to add it.
; I'm just going to ignore it for now, and move on to your sounds.
;
if (%hstatus == on) { /splay quia.wav }
}
;
; Next match bri
;
else if ($regex($1-,%term_2)) {
;
; Again, just a different set of words. Almost all the same code.
;
echo [color:blue]0[/color] -mt [color:blue]$target[/color] < $+ $nick $+ > $$1-
;
; Sound again
;
if (%hstatus == on) { /splay bri.wav }
}
;
; default output for anything else
else {
echo -mt # < $+ $nick $+ > $$1-
}
;
; Put haltdef down here. It's goiung to be called regardles, just call it once.
; With properly nested if statements also, the halt's are unnecessary.
;
haltdef
}