mIRC Home    About    Download    Register    News    Help

Print Thread
Nick listbox colors #171805 01/03/07 10:42 AM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
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!

Re: Nick listbox colors [Re: LethPhaos] #171820 01/03/07 03:00 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
something with "/who $active %nf" where an "h" in the result means the nick is 'here' meaning not away could help

Re: Nick listbox colors [Re: LethPhaos] #171880 02/03/07 02:21 AM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
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


LonDart
Re: Nick listbox colors [Re: LonDart] #171895 02/03/07 08:47 AM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
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) }
}

Re: Nick listbox colors [Re: LethPhaos] #171896 02/03/07 10:13 AM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
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.


LonDart
Re: Nick listbox colors [Re: LonDart] #171900 02/03/07 10:44 AM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
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?

Re: Nick listbox colors [Re: LethPhaos] #171908 02/03/07 02:09 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net