(events included below for reference)

the intent: An event, coming in a later file, is supposed to determine if a notice needs to be ignored. If it is, it's to halt the script, relying on the other event's & prefix to determine if the next event should print it out.

the problem: The first event (with an & prefix) executes before the event to determine if it should be ignored. The output is:
Code:
Halted is: false
Notice ignored

which is contrary to what I want. The scripts seem to be executing out of order. I don't really think there's any fix for the order, but could someone suggest a fix for my situation?

why I can't use ifs: The thing about the fix most are immediately thinking about (combining the events and using if statements) is that they _have_ to be in two separate files. The second file is a script which will eventually be distributed (the event provided is for reproducing behavior -- though I do currently have that overall halt in there ;-) while the first is my personal scripts, which I'm keeping to myself. If anyone else that would end up using the script had a script such as I do, the feature wouldn't work for them. They can't be combine because it would be too great a burden, imo, and anyone else that's using something like IRCn or some other such script wouldn't likely know how, or even where, to edit.

the fix: While I can understand this being easier on the author, I don't believe this order should be the case. The & prefix makes the script depend on other events being executed first -- if the & event executes first, what's to keep it from ever executing? So, I suggest making & events execute only after other events (without the &). This would give all other events that will execute anyway a chance to prevent the & event from being executed. As for the order of these events... well, it can't really be established any other way than the order in the files that is used now, or a future added order property.. but lets not get into that (it'd be badly used anyway). So, how 'bout it, Mr. Mardam-bey? Think you could program it in such a way as to execute & events last? ;-)

But my plea: anyone have any idea how I can get this to work as desired? I've tried all I can think of. an on &*:notice event will display the default notice (the blue thing in whatever window is active), tried an on ^*:notice to haltdef always, expecting the on *:notice to hit, but the on *:notice then doesn't work, on * will execute halted or not, but then you don't know if it was haltdef'd to prevent the default notice or if it was halted as a block. *sigh* I'm open to suggestions.

file: interface.mrc:
Code:
on &^*:Notice:*:?:{
  echo -s Halted is: $iif($halted,true,false)
  if ($window(@Notice- $+ $network) == $null) {
    window -enk[1] @Notice- $+ $network 
  }
  echo -t @notice- $+ $network $chr(91) $+ $nick $+ $chr(93) $1-
  haltdef
}


file: sCript.mrc:
Code:
on !^*:NOTICE:*:?: {
  echo -s Notice ignored.
  halt
}