mIRC Home    About    Download    Register    News    Help

Print Thread
on quit help needed please #70568
07/02/04 10:01 AM
07/02/04 10:01 AM
Joined: Feb 2004
Posts: 54
Cleveland, UK
Cyclone Offline OP
Babel fish
Cyclone  Offline OP
Babel fish

Joined: Feb 2004
Posts: 54
Cleveland, UK
#sx2.quits on
on 1:QUIT: {
if ($nick == $me) .amsg 4,0 S3x121 $sx2.nesrch( $network ) 2- ciao baby! ;)
else { if ($target != $active) sx2echo $sx2.npm( $nick ) 14quits $network - $1- }
}
#sx2.quits end

this code works... however, it's supposed to notify me when people quit from rooms i am in when that particular channel is not my active window. What i am getting is a notification whether i am active in that channel window or not. Can anybody please point me in the right direction?

Thanks in advance... grin

Re: on quit help needed please #70569
07/02/04 10:31 AM
07/02/04 10:31 AM
Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
KingTomato Offline
Hoopy frood
KingTomato  Offline
Hoopy frood

Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
QUIT events do not have a target or $chan identifier. you need to loop through $comchan() to get the channels a user quit on.


-KingTomato
Re: on quit help needed please #70570
08/02/04 08:38 PM
08/02/04 08:38 PM
Joined: Dec 2002
Posts: 35
C
Chris233 Offline
Ameglian cow
Chris233  Offline
Ameglian cow
C

Joined: Dec 2002
Posts: 35
Like this:
Code:
on ^*:QUIT: {
  var %d = 1
  while ($comchan($nick,%d)) {
    echo $color(quit) -t $ifmatch 13Quit: $nick $chr(91) $address $chr(93) $iif($1-,$+($chr(40),$1-,$chr(41)))
    inc %d
  }
  haltdef
}

Last edited by Chris233; 08/02/04 08:39 PM.