summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-01-18 10:37:53 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-01-18 10:37:53 +0100
commita3efc89a7fba57bc2af3afb7dd77fa43133887f6 (patch)
treed6d1e63943c44d443b92132010278b9e782ea0b8 /src
parentda40c8d33c7974906f53adda2f17574096c5287b (diff)
downloadweechat-a3efc89a7fba57bc2af3afb7dd77fa43133887f6.zip
Add IRC info "irc_nick_color" to get color of a nick
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-info.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c
index 365cf31fc..a561e5ae2 100644
--- a/src/plugins/irc/irc-info.c
+++ b/src/plugins/irc/irc-info.c
@@ -90,6 +90,10 @@ irc_info_get_info_cb (void *data, const char *info_name,
{
return irc_protocol_get_nick_from_host (arguments);
}
+ else if (weechat_strcasecmp (info_name, "irc_nick_color") == 0)
+ {
+ return irc_nick_find_color (arguments);
+ }
else if (weechat_strcasecmp (info_name, "irc_buffer") == 0)
{
if (arguments && arguments[0])
@@ -396,6 +400,8 @@ irc_info_init ()
&irc_info_get_info_cb, NULL);
weechat_hook_info ("irc_nick_from_host", N_("get nick from IRC host"),
&irc_info_get_info_cb, NULL);
+ weechat_hook_info ("irc_nick_color", N_("get nick color"),
+ &irc_info_get_info_cb, NULL);
weechat_hook_info ("irc_buffer", N_("get buffer pointer for an IRC server/channel"),
&irc_info_get_info_cb, NULL);