hirc

IRC client
Log | Files | Refs

commit b850f3bd590e47850abc62a69370cf9cb65b660a
parent 601033451ca6493d35cd6f0bdb991a2baebb64b5
Author: hhvn <dev@hhvn.uk>
Date:   Wed, 22 Dec 2021 14:18:27 +0000

s/config.c s/ui.c: formattting for topics

Diffstat:
Msrc/config.c | 14++++++++++++--
Msrc/ui.c | 2++
2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/config.c b/src/config.c @@ -440,6 +440,11 @@ struct Config config[] = { .strhandle = config_redraws, .description = { "Format of modes being set on channels", NULL}}, + {"format.topic", 1, Val_string, + .str = "topic%{=}\"${2}\" set by %{nick:${nick}}${nick}%{o} now", + .strhandle = config_redraws, + .description = { + "Format of topic being set", NULL}}, /* Generic numerics (bit boring) */ {"format.rpl.welcome", 1, Val_string, .str = "${2-}", @@ -733,12 +738,12 @@ struct Config config[] = { .description = { "Format of RPL_CHANNELMODEIS (324) numeric", NULL}}, {"format.rpl.notopic", 1, Val_string, - .str = "${2-}", + .str = "topic%{=}no topic set", .strhandle = config_redraws, .description = { "Format of RPL_NOTOPIC (331) numeric", NULL}}, {"format.rpl.topic", 1, Val_string, - .str = "${2-}", + .str = "topic%{=}\"${3}\"", .strhandle = config_redraws, .description = { "Format of RPL_TOPIC (332) numeric", NULL}}, @@ -1119,6 +1124,11 @@ struct Config config[] = { .strhandle = config_redraws, .description = { "Format of RPL_WHOISACCOUNT (330) numeric", NULL}}, + {"format.rpl.topicwhotime", 1, Val_string, + .str = "set by %{nick:${3}}${3}%{o} on ${4}", + .strhandle = config_redraws, + .description = { + "Format of RPL_TOPICWHOTIME (333) numeric", NULL}}, {"format.rpl.whoisactually", 1, Val_string, .str = " %{b}actually%{b}: ${3-}", .strhandle = config_redraws, diff --git a/src/ui.c b/src/ui.c @@ -97,6 +97,7 @@ struct { {"KICK", "format.kick"}, {"QUIT", "format.quit"}, {"NICK", "format.nick"}, + {"TOPIC", "format.topic"}, /* START: misc/rpl-ui-gen.awk */ {"200", "format.rpl.tracelink"}, {"201", "format.rpl.traceconnecting"}, @@ -236,6 +237,7 @@ struct { {"266", "format.rpl.globalusers"}, {"320", "format.rpl.whoisspecial"}, {"330", "format.rpl.whoisaccount"}, + {"333", "format.rpl.topicwhotime"}, {"338", "format.rpl.whoisactually"}, {"378", "format.rpl.whoishost"}, {"379", "format.rpl.whoismodes"},