mIRC Homepage
Posted By: Midori halt/haltdef not working? - 28/07/07 10:45 AM
I have this script:

Code:
on *:snotice:*Notice -- Received KILL message for *:{
  if ($window(@Kills) == $null) window -nk0 @Kills
  aline -ph @Kills $+($chr(91),$time,$chr(93),$chr(32),$network,:) $10 killed $left($8,-1) for $11-
  haltdef
  halt
}


But the kill messages still show up in both the status window and the created @Kills window, how come?

As far as I can tell, I haven't overridden halt and haltdef with noop or anything weird like that.

I also have several on wallops and on snotice events as well, same thing is happening to them.. they go to status and the @window associated with it.

EDIT:: Yes, I'm using the latest mIRC
Posted By: qwerty Re: halt/haltdef not working? - 28/07/07 11:14 AM
Use the ^ event prefix and either halt or haltdef.
Posted By: Midori Re: halt/haltdef not working? - 28/07/07 08:13 PM
Haha wow, thanks a lot qwerty, worked.

So what is it that the ^ does? smirk I always thought it was just for events that weren't your own so I generally don't bother with it.
Posted By: qwerty Re: halt/haltdef not working? - 28/07/07 08:26 PM
The ^ prefix is mentioned in /help /haltdef but the help file isn't very clear. Events prefixed with ^ trigger before the default mirc action(s) take place. One of those actions is displaying the snotice (or whatever other) message received from the server. /halt stops mirc's default actions, but you can't stop what has already happened. This is why /halt on a non-^-prefixed event doesn't do anything: by the time such an event triggers, mirc has already handled the message, ie displayed the default text.
© mIRC Discussion Forums