From WikiChip
Editing mirc/commands/cnick

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 23: Line 23:
 
== Parameters ==
 
== Parameters ==
 
* '''[nick[!user@host]]''' - Nickname or the host mask to be added
 
* '''[nick[!user@host]]''' - Nickname or the host mask to be added
* '''[color]''' - The color to assign the nick/host. 0-98 or autocolor=*
+
* '''[color]''' - The color to assign the nick/host
 
* '''[modes]''' - List of modes that is required for the nick/host (Ed. ~&@%+)
 
* '''[modes]''' - List of modes that is required for the nick/host (Ed. ~&@%+)
 
* '''[levels]''' - Access level form the user list
 
* '''[levels]''' - Access level form the user list
Line 35: Line 35:
 
;Add color 3 for all half-op
 
;Add color 3 for all half-op
 
/cnick * 3 %</syntaxhighlight>
 
/cnick * 3 %</syntaxhighlight>
 
== AutoColor ==
 
Starting v7.58 you can now have nicks pseudo-randomly colored based on the nick. The rules appear to be:
 
1. colors chosen for the auto-color palette depend on the RGB value of $color(background) (even if that is a different color than the background for the nicklist)
 
2. If a color index has an RGB value matching one that's already been chosen, the 2nd color index is not chosen. This means that for the "mIRC Classic" scheme where index 4 and 52 have the same RGB, that it will not choose both 4 and 52 into the palette.
 
3. Colors are chosen if an algorithm determines that their RGB has sufficient contrast against the background RGB, with no attempt to avoid 2 colors in the palette not contrasting against each other.
 
4. If there is another Nick Colors rule already using a color index, that index is not chosen for auto-color even if it contrasts well. That means you can have a rule to make all @op nicks be color 4 red, and index 4 will not be added to the palette. However, since 4 is not chosen, 52 being identical RGB to color 4 can still be chosen if it contrasts against the background.
 
5. Each time a color rule is added/removed to/from Nick Colors and you click OK, the palette is recalculated to see the palette changes. Same goes for each time /color Background N is used, even if that does not change to a different index. But it does not automatically update the palette when using the /cnick command.
 
6. The nick's color is based on the case-sensitive value of the nick itself, so it does change if using 'Maroon' vs 'maroon' and does not change due to the nick being at a different network or if the address changes.
 
7. Because the auto color for the same nick depends on the number of colors in the autocolor palette, adding or removing another rule can change the number of colors in the palette, which changes the bucket of colors into which each nick is placed.
 
 
If you find that the autocolor is using too many colors which do not contrast against the background, there are some workarounds which may or may not work for you.
 
 
One is to change your black background from index 1 to one of the color indices like 89 or 90 which look like black but have slightly different RGB which causes a different batch of colors to be chosen for the palette. However, be aware that this can have an adverse effect on colored strings which normally change color 1 into color 0 if the background is also index 1 - and those will no longer do the same for background 88 even if that has an identical RGB to index 1
 
 
Another is to take advantage of the fact that colors used by other nick color rules are not chosen for the autocolor palette, so you can simply create a dummy rule that won't actually match any nicks, but the presence of this rule will prevent it being chosen for the autocolor palette. To do this, you can use the Alt+P editor to place this line into your nicklist popups menu. (If putting into a dropdown menu you probably need to prefix the label with a .period)
 
 
Dummy rule for autocolor $nick($chan,$1).color : var %color $nick($chan,$1).color | !.cnick -m2s $+ $calc(1+$cnick(0)) ;dummycolor $+ %color %color @ | !.color background $color(background)
 
 
This creates a menu item that shows you the color being used by that nick, and you can add a dummy rule to your nick colors list which uses that color - by simply right-clicking on a nick that you can't read because that color does not contrast against the background, and choosing this command. Note that it contains the command to reset the background to the existing background color, because that's necssary to force the autocolors to reset based on the new palette that has 1 fewer colors in it.
 
 
If you want to use that color again, you can simply go to the Nick Colors tab of the address book and delete it.
 
  
 
== Compatibility ==
 
== Compatibility ==
Line 62: Line 40:
  
 
== See also ==
 
== See also ==
 +
* [[List of commands - mIRC|List of commands]]
 +
* [[List of identifiers - mIRC|List of identifiers]]
 
* {{mIRC|$abook}}
 
* {{mIRC|$abook}}
 
* {{mIRC|$cnick}}
 
* {{mIRC|$cnick}}
 
* {{mIRC|$nick}}
 
* {{mIRC|$nick}}
 
* {{mIRC|/abook}}
 
* {{mIRC|/abook}}
 +
{{mIRC command list}}
 +
 +
[[Category:mIRC commands|cnick command - mIRC]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)