commit f69335a331196583b43484a1d1fef2d791f9e264
parent e507369d9d61a6bbf8c033b32a8661d81dca3377
Author: hhvn <dev@hhvn.uk>
Date: Sat, 20 Nov 2021 22:14:56 +0000
config.c hirc.h: refresh nicklist on changing nickcolour.*
Diffstat:
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
@@ -76,13 +76,13 @@ struct Config config[] = {
"See reconnect.interval", NULL}},
{"nickcolour.self", 1, Val_colour,
.num = 90,
- .numhandle = NULL,
+ .numhandle = config_nickcolour_self,
.description = {
"Colour to use for onself.",
"Must be 0, 99 or anywhere between. 99 is no colours.", NULL}},
{"nickcolour.range", 1, Val_colourpair,
.pair = {28, 63},
- .pairhandle = NULL,
+ .pairhandle = config_nickcolour_range,
.description = {
"Range of (mirc extended) colours used to colour nicks",
"Must be 0, 99 or anywhere between. 99 is no colour",
@@ -389,3 +389,15 @@ config_buflist_width(long num) {
ui_error("buflist will be too big", NULL);
return 0;
}
+
+int
+config_nickcolour_self(long num) {
+ windows[Win_nicklist].refresh = 1;
+ return 1;
+}
+
+int
+config_nickcolour_range(long a, long b) {
+ windows[Win_nicklist].refresh = 1;
+ return 1;
+}
diff --git a/hirc.h b/hirc.h
@@ -138,6 +138,8 @@ int config_nicklist_location(long num);
int config_nicklist_width(long num);
int config_buflist_location(long num);
int config_buflist_width(long num);
+int config_nickcolour_self(long num);
+int config_nickcolour_range(long a, long b);
/* main.c */
extern struct Server *servers;