mIRC Home    About    Download    Register    News    Help

Print Thread
#225157 26/08/10 07:06 PM
Joined: Aug 2010
Posts: 134
T
Thels Offline OP
Vogon poet
OP Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
Hi,

Is there a way to check if a nickname should have a channel color, other than comparing it to "$color(listbox text)"?

Or is it impossible to differentiate between no color and the listbox text color?


Learning something new every day.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You can use $cnick(nick) to tell if a nickname has a colour rule applied to it. It will return 0 if there is no colour rule for that nick.

See /help $cnick for the details.

Last edited by starbucks_mafia; 26/08/10 10:19 PM.

Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2010
Posts: 134
T
Thels Offline OP
Vogon poet
OP Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
Yes, but that affects the nick specifically, regardless of channel, and does not include nicknames that receive a color due to a channel rank or idle time.

I'm using !$cnick for private messages. Just wondering if there was such an option for channel messages.

Thanks for the help, though.

Last edited by Thels; 26/08/10 10:21 PM.

Learning something new every day.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$cnick() will account for any mode signs included with the nick given, so you can use $cnick($nick(#, nickname).pnick) to get the rank applied.

I must admit I don't know any simple way to apply the idle time to that though. The non-simple way being to loop through $cnick(n).idle [where n is a number in the range 1 - $cnick(0)] and compare it with $nick(#, nickname).idle divided by 60 ($nick().idle is in seconds, $cnick().idle is in minutes).

Last edited by starbucks_mafia; 26/08/10 10:31 PM.

Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2010
Posts: 134
T
Thels Offline OP
Vogon poet
OP Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
Originally Posted By: starbucks_mafia
$cnick() will account for any mode signs included with the nick given, so you can use $cnick($nick(#, nickname).pnick) to get the rank applied.


Hmm, nice trick about the .pnick. Didn't know $cnick would pick that up. Your method is a tad more complex than what I want to script for this occasion. Quite possible, yes, but a little bloated, since after it also needs to be compared to the $cnick entry.

Thanks for the help, but I think I'll just stick to != $color(listbox text) and allow the occasional nickname that's identical to the listbox color to slip through.


Learning something new every day.

Link Copied to Clipboard