mIRC Homepage
Posted By: Wragg color list - 25/11/04 03:27 AM
in adress book under "nick"

is it possible if i have many nicknames there added, to delete them all exept $me through script ?

like if i have colored:

John
Sarah
UFO
$me
someone
....

to delete all exept colorised $me ?
Posted By: Danthemandoo Re: color list - 25/11/04 05:23 AM
/cnick -r name

and do a loop using $cnick(0)
Posted By: Wragg Re: color list - 25/11/04 09:27 AM
i dont know how to do that loop that checks... thatzy why i posted =(
Posted By: Iori Re: color list - 25/11/04 10:25 AM
Code:
alias clearcnicks {
  var %i = $cnick(0)
  while %i {
    if $cnick(%i) && $v1 != $!me { cnick -r $v1 }
    dec %i
  }
}
  • if $cnick(%i) && $v1 != $!me { cnick -r $v1 }
This line check first if the entry is a nickname, if it is then checks if it is not "$me". iF BOTH are true the entry is removed.
"$!me" evaluates to "$me" in the if check, where using "if $v1 != $me" would check the entry against your nick.
Posted By: Wragg Re: color list - 25/11/04 11:14 AM
i am gratefull to you Iori, but as one user told me that $v things are not supported by mirc 6.03, is it possible or even better, are you willing to "adapt" the code for m6.03 ?

i would be very gratefull
Posted By: Iori Re: color list - 25/11/04 11:58 AM
Code:
alias clearcnicks {
  var %i = $cnick(0)
  while %i {
    if $cnick(%i) && $ifmatch != $!me { cnick -r $cnick(%i) }
    dec %i
  }
}

Prefix the 'cnick' with a period (" .cnick -r $cnick(%i) ") to hide the * Removed xxx from color list
Posted By: Wragg Re: color list - 25/11/04 12:07 PM
thank you so much Iori !
© mIRC Discussion Forums