mIRC Homepage
Posted By: _D3m0n_ AWAY nicks - 15/03/03 01:54 AM
ok is there some sort of identifier for finding who is away and not away in a nick list?? cause ive seen some ppl have icons for ppl who are away ...... but ...i surly cant find any $nick identifier in the help file that will show a list of away nicks in a while loop ...... could someone gimme alil help on this if possible?
Posted By: Nimue Re: AWAY nicks - 15/03/03 02:16 AM
'/who #chan' and check raw 352 for "H" (here) or "G" (gone) in $7

:server 352 yournick #channel identd host server nick G|H(maybe other info here too) hops fullname
Posted By: _D3m0n_ Re: AWAY nicks - 15/03/03 02:19 AM
very cool ty .....
Posted By: _D3m0n_ Re: AWAY nicks - 15/03/03 06:06 AM
Code:
raw 352:*:{
  if (G isin $7) { set -u10 %Away.Nicks $addtok(%Away.Nicks, $6, 32) }
  elseif (G !isin $7) { set -u10 %Away.Nicks $deltok($findtok(%Away.Nicks, $6, 32)%Away.Nicks, $6, 32) }
  haltdef  
}
raw 315:*:{ haltdef }


ok with that ive now been able to put together a list of away nick into a variable ..... the reason i added the !isin is to remove any nicks that may have changed from a previous away before the variable had cleared ...... anyhow now what im trying to do is make it so in my while loop nicklist populater

Code:
alias fillnicklist {
  who $active
  %sn = 1
  var %nickl = $nick($chan($active),%sn,a)
  if $nick($chan($active),%sn,a) isreg $chan($active) { did -ra _nicklist 1 0 + 1 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) isop $chan($active) { did -ra _nicklist 1 0 + 2 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) ishop $chan($active) { did -ra _nicklist 1 0 + 3 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) isvoice $chan($active) { did -ra _nicklist 1 0 + 4 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) isowner $chan($active) { did -ra _nicklist 1 0 + 5 0 0 $nick($chan($active),%sn,a) }
  %sn = 2
  while ( $nick($chan($active),%sn,a) != $null ) {
    if $nick($chan($active),%sn,a) isreg $chan($active) { did -a _nicklist 1 0 + 1 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) isop $chan($active) { did -a _nicklist 1 0 + 2 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) ishop $chan($active) { did -a _nicklist 1 0 + 3 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) isvoice $chan($active) { did -a _nicklist 1 0 + 4 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) isowner $chan($active) { did -a _nicklist 1 0 + 5 0 0 $nick($chan($active),%sn,a) }
    inc %sn
  }
}


i want to try to be able to not add that nick till it runs thru all the above things and it doesnt meet it because its in that list ..... and it add it like this .....
Code:
  if $nick($chan($active),%sn,a) isin $chan($active)  && if $nick($chan($active),%sn,a) == SOMEHOW FROM THAT AWAY.NICKS VAR { did -ra _nicklist 1 0 + 6 0 0 $nick($chan($active),%sn,a) }


but my first problem is is i cant seem to negate it from that loop as it is right now ..... ive tried findtok and it doesnt list any nicks at all in the list ...... maybe if someone could gimme alil help with the reason my $findtok(blah,blah,blah) == $null doesnt work id be much appreciative ... cause as of right now im still having lil errors i cant seem to get by with this ...... again ty for any help anyone could offer me
Posted By: Nimue Re: AWAY nicks - 15/03/03 06:19 AM
$istok()
if $istok(%Away.Nicks,<nick>,32)
if $istok(%Away.Nicks,$nick($chan($active),%sn,a),32) { }
Posted By: _D3m0n_ Re: AWAY nicks - 15/03/03 06:38 AM
lol i thank u yet again ... ive not totally got it working but it is showing 2 nicks with two separate icons ..... lol better than showing nothing at all so atleast im heading in the right direction ..... lol ty again ... now all i gotta do is stop it from going any further once it matches the loop defs ty nimue
Posted By: Nimue Re: AWAY nicks - 15/03/03 06:48 AM
Code:
  %sn = 2
  while ( $nick($chan($active),%sn,a) != $null ) {
    [color:green]; Put it into here..[/color]
    [color:brown]if $istok(blahblah...) {
      did -a blabla
      inc %sn | continue
    }[/color]
    ; rest of code....
/help /continue smile
© mIRC Discussion Forums