mIRC Home    About    Download    Register    News    Help

Print Thread
#181653 28/07/07 10:45 AM
Joined: Feb 2006
Posts: 64
M
Midori Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
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

Last edited by Midori; 28/07/07 10:46 AM.

/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Use the ^ event prefix and either halt or haltdef.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Feb 2006
Posts: 64
M
Midori Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
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.


/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard