mIRC Homepage
Posted By: LethPhaos Nick listbox colors - 01/03/07 10:42 AM
Hi,

It's been a while since I last scripted so I need some help.

Basically, what I want to do is list the nicknames of the people who are /away in another color, say color 15 (light grey in the default scheme)

Since there is no on away event I'd use a timer to check the away status of every nick in the activated channel (other channels are invisible the way I use mIRC so it would be a waste of resources to check them too), and if a nick is away change it's color to 15, else, change nothing. What would that look like in code? :p

Thanks in advance!
Posted By: LethPhaos Re: Nick listbox colors - 01/03/07 03:00 PM
something with "/who $active %nf" where an "h" in the result means the nick is 'here' meaning not away could help
Posted By: LonDart Re: Nick listbox colors - 02/03/07 02:21 AM
Here's a wild guess smile
Code:
alias awaycheck { 
  set %ckchan $active
  who %ckchan
}

raw 352:*%ckchan*: {
  if ( H !isincs $7 ) { set %awnicks $+(%awnicks,$chr(32),$6) }
}

raw 315:*%ckchan*: { graynick }

alias graynick {
  set -u0 %x $nick(%ckchan,0)
  while %x {
    if ( $istok (%awnicks,$nick(%ckchan,%x),32) ) {
      cline -m 15 %ckchan %x
    }
    else cline -r %ckchan %x
    dec %x
  }
unset %ckchan %awnicks
}

untested
Posted By: LethPhaos Re: Nick listbox colors - 02/03/07 08:47 AM
Thanks!

As far as I know (but I know little) that should work, but the users who are /away aren't greyed out frown

I had already tried this, but it doesn't work either smile

Code:
alias awaycolor {
  who $$1 %nf,369
}
raw 354:& 369 & &:{
  if ( h !isin $2 && H !isin $2 ) { cnick $1 15 }
  else { cline -r $cnick($1) }
}
Posted By: LonDart Re: Nick listbox colors - 02/03/07 10:13 AM
Found the problem. Raw doesn't like the variable.
Change them to just:
Code:
raw 352:*: {
and
Code:
raw 315:*: {

If you're really only going to use this on one channel, can probably do away with the %ckchan variable
altogether, but it worked for me once I took it out of the raws.
Posted By: LethPhaos Re: Nick listbox colors - 02/03/07 10:44 AM
cool indeed

another question, the nick is grey in the window too if the /away says something. Is it possible to make it show up in grey only in the nick listbox?
Posted By: Riamus2 Re: Nick listbox colors - 02/03/07 02:09 PM
The colors in the nicklist are always going to match the colors in the channel unless you're using a DLL for the nick list (such as nicklust), which *may* allow you to specify different colors than what mIRC's really using.
© mIRC Discussion Forums