^ halts mirc's usualy display of an event, youd use that to make a custom message like change how the join looks, * makes a remote script accessiable by all users The & prefix You can prevent an event from being triggered if a previous script used /halt or /haltdef to halt the display of default text for an event by using the & prefix.
on &1:TEXT:*:?:/echo this event won't trigger if $halted is true
To be more specific: ^ by itself is worthless, just as haltdef is. But when used together. they will prevent the default output of an event (raw events and on input excepted).
Code:
on [color:blue]^[/color]*:TEXT:matchtext:location: {
do stuff
[color:blue]haltdef[/color]
}
To be even more specific: ^ changes the order in which the event is processed relative to mIRC's own event handlers.
1. on ^*:TEXT: fires first 2. mIRC gets its chance at it. 3. on *:TEXT: fires last
You do not necessarily always want to use halt/haltdef with it. If all you wish to do is print out a warning line for joining clones BEFORE the * Joins: line but are not going to reformat the normal * Joins: line, there is no need to /halt or /haltdef it.
If your event is simply going to log something and you don't care about reformatting the output, you can /halt in on *:TEXT: to just halt the script or /haltdef (depending on the event) which will halt no default text since that text has already been echoed out by mIRC's own event handlers. This might be useful if you have scripts loaded after the current script that you don't want an on &*:TEXT: to fire if $halted is true; in such a case, the only purpose of the first event with the /haltdef might even be simply to halt the rest of the on TEXT's. ("It's ok fellas, I've already handled this one.")
Yeah, you can do other nifty stuff with ^ too, like a dynamic Highlight list. The highlight list allows vars/identifiers as items. So you can put a %myhilite var in the list and have something like:
on ^*:text:*something*:#: set %myhilite somethingelse
mirc will fire the ^ event, set %myhilite accordingly and then apply the highlight settings with the updated variable