commit e6ab59adb7a45f65a5dcba7a1acda97bbf0c597a
parent 57b19d8dd0526b9b455135870a0b0a5b8b171c94
Author: hhvn <dev@hhvn.uk>
Date: Thu, 9 Dec 2021 00:51:55 +0000
ui.c config.c: create /grep formats
Diffstat:
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/config.c b/config.c
@@ -247,6 +247,16 @@ struct Config config[] = {
.strhandle = config_redraws,
.description = {
"Format of footer of /bind output", NULL}},
+ {"format.ui.grep.start", 1, Val_string,
+ .str = "%{b}%{c:94}Results of ${1}:",
+ .strhandle = config_redraws,
+ .description = {
+ "Format of start of /grep output", NULL}},
+ {"format.ui.grep.end", 1, Val_string,
+ .str = "",
+ .strhandle = config_redraws,
+ .description = {
+ "Format of end of /grep output", NULL}},
{"format.privmsg", 1, Val_string,
.str = "%{nick:${nick}}${nick}%{o}%{=}${2}",
.strhandle = config_redraws,
diff --git a/ui.c b/ui.c
@@ -60,6 +60,8 @@ struct {
{"SELF_KEYBIND_START", "format.ui.keybind.start"},
{"SELF_KEYBIND_LIST", "format.ui.keybind"},
{"SELF_KEYBIND_END", "format.ui.keybind.end"},
+ {"SELF_GREP_START", "format.ui.grep.start"},
+ {"SELF_GREP_END", "format.ui.grep.end"},
/* Real commands/numerics from server */
{"PRIVMSG", "format.privmsg"},
{"JOIN", "format.join"},