I didn't mean any disrespect Wims. I've only used haltdef for themes. I see people using halt a lot instead of return or using elseif. I personally think return or elseif is a better option. Unless of course you want to halt an event.
Which is why you want to keep that ctcp event.
argvo is right.
You can only have one text event per file that gathers all info. I'm not sure if you can put another text file after one that has a wildcard for all text. It's been a number of years since I tested that.
Any text event I do like this I have a flood protect. This is just the basic idea behind a text flood protect.
Next, since you use an alias to strip the font, I like to tokenize it with $chr(32), or the space character. Now you can refer to the text as $1- instead of $strip($1-). This way you only run the text through the alias once per event vs. at every comparison until you get the positive match.
And elseif is nice to use to clean up and speed up your scripts. Now it will only go through comparisons until it gets a positive match. (Unless you put an if statement under it.)
A few little changes to make mirc do less processing may not do much, but added up and your scripts can run leaner, faster, and in my opinion, more stable.
on 1:TEXT:*:#: {
if (%txt. [ $+ [ $chan ] ] [ $+ [ . [ $+ [ $nick ] ] ] ] > 4) { return }
;if flood detected return
tokenize 32 $strip($1-) | inc -u3 %txt. [ $+ [ $chan ] ] $+ . $+ [ $nick ]
;tokenize $strip($1-) & count $nick text for flood protect
if (textgoeshere isin $1-) { splay -w "short filepath to wav file" }
elseif (othertext isin $1-) { command }
elseif (anothertext isin $1-) { command }
}
There is nothing wrong with using individual text events either, you just have to put them above the event that triggers for all text. i.e.:
on *:text:*matchtext*:#:{ command }
on *:text:*match *:#:{ command }
on *:text:*:#:{ command }