Created
January 27, 2016 01:05
-
-
Save jgeboski/72a18b1844f57da70bef to your computer and use it in GitHub Desktop.
Extend the color range of nicknames in HexChat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/common/text.c b/src/common/text.c | |
index 73ea7f9..ece22e4 100644 | |
--- a/src/common/text.c | |
+++ b/src/common/text.c | |
@@ -2080,8 +2080,6 @@ pevt_build_string (const char *input, char **output, int *max_arg) | |
/* also light/dark gray (14/15) */ | |
/* 5,7,8 are all shades of yellow which happen to look damn near the same */ | |
-static char rcolors[] = { 19, 20, 22, 24, 25, 26, 27, 28, 29 }; | |
- | |
int | |
text_color_of (char *name) | |
{ | |
@@ -2089,8 +2087,7 @@ text_color_of (char *name) | |
while (name[i]) | |
sum += name[i++]; | |
- sum %= sizeof (rcolors) / sizeof (char); | |
- return rcolors[sum]; | |
+ return (sum % 12) + 18; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment