From 5059743dd284d0a5f2e0d9257a97984b5a3363f5 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 30 Jul 2011 10:20:19 +0200 Subject: irc: add "server" and "channel" in hook_focus of bar item "buffer_nicklist" --- src/plugins/irc/irc-bar-item.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/irc') diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 89b50392c..61c5b461f 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -518,7 +518,7 @@ irc_bar_item_focus_buffer_nicklist (void *data, /* make C compiler happy */ (void) data; - if (ptr_channel) + if (ptr_server && ptr_channel) { nick = weechat_hashtable_get (info, "nick"); if (nick) @@ -527,9 +527,11 @@ irc_bar_item_focus_buffer_nicklist (void *data, if (ptr_nick && ptr_nick->host) { weechat_hashtable_set (info, "host", ptr_nick->host); - return info; } } + weechat_hashtable_set (info, "server", ptr_server->name); + weechat_hashtable_set (info, "channel", ptr_channel->name); + return info; } return NULL; -- cgit v1.2.3