diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-07-03 16:02:03 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-07-03 16:02:03 +0200 |
commit | b97a979f611c0ece7fd26f9c303394d2ee9d0b0e (patch) | |
tree | 26474a3c486c3bd2a69a5bc3ea2b9aaf962bd3bf /src/plugins/irc/irc-protocol.c | |
parent | 31f9a82f1628212a3b43678c23e9828eede46911 (diff) | |
download | weechat-b97a979f611c0ece7fd26f9c303394d2ee9d0b0e.zip |
Add "buffer_nicklist" bar item and scroll feature in bars with /bar scroll
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index fc8c1c194..a1e3c99a9 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3568,6 +3568,7 @@ irc_protocol_cmd_366 (struct t_irc_server *server, const char *command, { struct t_irc_channel *ptr_channel; struct t_plugin_infolist *infolist; + struct t_config_option *ptr_option; int num_nicks, num_op, num_halfop, num_voice, num_normal, length, i; char *string, *prefix; @@ -3590,8 +3591,12 @@ irc_protocol_cmd_366 (struct t_irc_server *server, const char *command, if (strcmp (weechat_infolist_string (infolist, "type"), "nick") == 0) { + weechat_config_search_with_string (weechat_infolist_string (infolist, + "prefix_color"), + NULL, NULL, &ptr_option, + NULL); length += - strlen (weechat_infolist_string (infolist, "prefix_color")) + + ((ptr_option) ? strlen (weechat_color (weechat_config_string (ptr_option))) : 0) + strlen (weechat_infolist_string (infolist, "prefix")) + strlen (IRC_COLOR_CHAT) + strlen (weechat_infolist_string (infolist, "name")) + 1; @@ -3612,9 +3617,12 @@ irc_protocol_cmd_366 (struct t_irc_server *server, const char *command, prefix = weechat_infolist_string (infolist, "prefix"); if (prefix[0] && (prefix[0] != ' ')) { - strcat (string, - weechat_color (weechat_infolist_string (infolist, - "prefix_color"))); + weechat_config_search_with_string (weechat_infolist_string (infolist, + "prefix_color"), + NULL, NULL, &ptr_option, + NULL); + if (ptr_option) + strcat (string, weechat_color (weechat_config_string (ptr_option))); strcat (string, prefix); } strcat (string, IRC_COLOR_CHAT); |