mIRC Homepage

on quit help needed please

Posted By: Cyclone

on quit help needed please - 07/02/04 10:01 AM

#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
Posted By: KingTomato

Re: on quit help needed please - 07/02/04 10:31 AM

QUIT events do not have a target or $chan identifier. you need to loop through $comchan() to get the channels a user quit on.
Posted By: Chris233

Re: on quit help needed please - 08/02/04 08:38 PM

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
}
© 2021 mIRC Discussion Forums