mIRC Homepage
Posted By: xrn0id $comchan - 23/02/03 02:52 PM
on *:NICK: {
echo $comchan 7:2[ $+ $asctime(hh:nn:ss) $+ ]7 $nick is now knows as $newnick
haltdef
}

that does not work for me, what is wrong?
Posted By: MonoSex Re: $comchan - 23/02/03 03:07 PM
$comchan needs parameters.
You have to loop through $comchan($nick,[number]) with while loop.
$comchan($nick,0) returns the number of common channels.
Posted By: xrn0id Re: $comchan - 23/02/03 03:35 PM
so how can i make that work with comchan?
Posted By: NightChillz Re: $comchan - 23/02/03 03:40 PM
Using $comchan($nick,1) will return the name of the first channel you are currently in with that nick.
Posted By: xrn0id Re: $comchan - 23/02/03 03:48 PM
k ty
Posted By: Hammer Re: $comchan - 23/02/03 04:03 PM
Code:

on ^*:NICK:{
  var %i = 1
  while $comchan($newnick, %i) {
    echo $color(nick) -bflirt $ifmatch * $nick ( $+ $address $+ ) is now known as $newnick
    inc %i
  }
  haltdef
}
on ^*:QUIT:{
  var %i = 1, %reason = ( $+ $1- $+ )
  while $comchan($nick, %i) {
    echo $color(quit) -bflirt $ifmatch * Quits: $nick ( $+ $address $+ ) %reason
    inc %i
  }
  haltdef
}
© mIRC Discussion Forums