summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-08-07 07:36:50 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-08-07 07:36:50 +0200
commitcc92883449c0621e2b94beb617b2a300d02894b4 (patch)
tree2826963ca1af4326651f7952ba7e32c0d761a6ef /src/plugins/irc
parent6923a9efa066ac62e27d6fd353df0ec618c9cd78 (diff)
parent6ef0e5ec1e36b4f39fb1bf82c234a259c86e8db3 (diff)
downloadweechat-cc92883449c0621e2b94beb617b2a300d02894b4.zip
Merge remote-tracking branch 'origin/pr/475'
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-color.h1
-rw-r--r--src/plugins/irc/irc-config.c7
-rw-r--r--src/plugins/irc/irc-config.h1
-rw-r--r--src/plugins/irc/irc-protocol.c3
4 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-color.h b/src/plugins/irc/irc-color.h
index 027f93802..cc8f58bf6 100644
--- a/src/plugins/irc/irc-color.h
+++ b/src/plugins/irc/irc-color.h
@@ -86,6 +86,7 @@
#define IRC_COLOR_MESSAGE_JOIN weechat_color(weechat_config_string(irc_config_color_message_join))
#define IRC_COLOR_MESSAGE_QUIT weechat_color(weechat_config_string(irc_config_color_message_quit))
#define IRC_COLOR_REASON_QUIT weechat_color(weechat_config_string(irc_config_color_reason_quit))
+#define IRC_COLOR_TOPIC_CURRENT weechat_color(weechat_config_string(irc_config_color_topic_current))
#define IRC_COLOR_TOPIC_OLD weechat_color(weechat_config_string(irc_config_color_topic_old))
#define IRC_COLOR_TOPIC_NEW weechat_color(weechat_config_string(irc_config_color_topic_new))
#define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(irc_config_color_input_nick))
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 85539eb96..9ebeb3b7d 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -125,6 +125,7 @@ struct t_config_option *irc_config_color_mirc_remap;
struct t_config_option *irc_config_color_nick_prefixes;
struct t_config_option *irc_config_color_notice;
struct t_config_option *irc_config_color_reason_quit;
+struct t_config_option *irc_config_color_topic_current;
struct t_config_option *irc_config_color_topic_new;
struct t_config_option *irc_config_color_topic_old;
@@ -2907,6 +2908,12 @@ irc_config_init ()
N_("color for reason in part/quit messages"),
NULL, -1, 0, "default", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
+ irc_config_color_topic_current = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "topic_current", "color",
+ N_("color for current channel topic (when joining or using /topic)"),
+ NULL, -1, 0, "default", NULL, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL);
irc_config_color_topic_new = weechat_config_new_option (
irc_config_file, ptr_section,
"topic_new", "color",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 4e7843703..4193ed1d8 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -168,6 +168,7 @@ extern struct t_config_option *irc_config_color_mirc_remap;
extern struct t_config_option *irc_config_color_nick_prefixes;
extern struct t_config_option *irc_config_color_notice;
extern struct t_config_option *irc_config_color_reason_quit;
+extern struct t_config_option *irc_config_color_topic_current;
extern struct t_config_option *irc_config_color_topic_new;
extern struct t_config_option *irc_config_color_topic_old;
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index b83b7fc03..f3d7bff92 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -3476,11 +3476,12 @@ IRC_PROTOCOL_CALLBACK(332)
server, NULL, command, NULL, ptr_buffer),
date,
irc_protocol_tags (command, "irc_numeric", NULL, NULL),
- _("%sTopic for %s%s%s is \"%s%s\""),
+ _("%sTopic for %s%s%s is \"%s%s%s\""),
weechat_prefix ("network"),
IRC_COLOR_CHAT_CHANNEL,
argv[3],
IRC_COLOR_RESET,
+ IRC_COLOR_TOPIC_CURRENT,
(topic_color) ? topic_color : ((pos_topic) ? pos_topic : ""),
IRC_COLOR_RESET);
}