diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-19 23:31:49 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-19 23:38:28 +0200 |
commit | a88b8f7ed21ab796a7b041a138bc0f4fe2bba06a (patch) | |
tree | 860bb39cb3349f3ba2acaf97be6a07a9b21af330 /src/plugins/irc/irc-info.c | |
parent | 1896c50c116919db882c40b778aa887035f5c11b (diff) | |
download | weechat-a88b8f7ed21ab796a7b041a138bc0f4fe2bba06a.zip |
irc: revert compute of nick colors to case sensitive way, deprecate again IRC nick color infos (issue #194, issue #2032)
Diffstat (limited to 'src/plugins/irc/irc-info.c')
-rw-r--r-- | src/plugins/irc/irc-info.c | 56 |
1 files changed, 8 insertions, 48 deletions
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c index ebd0265cd..a95d95f1f 100644 --- a/src/plugins/irc/irc-info.c +++ b/src/plugins/irc/irc-info.c @@ -197,10 +197,6 @@ irc_info_info_irc_nick_color_cb (const void *pointer, void *data, const char *info_name, const char *arguments) { - char *pos_comma, *server; - const char *pos_nick; - struct t_irc_server *ptr_server; - /* make C compiler happy */ (void) pointer; (void) data; @@ -209,21 +205,7 @@ irc_info_info_irc_nick_color_cb (const void *pointer, void *data, if (!arguments || !arguments[0]) return NULL; - ptr_server = NULL; - pos_nick = arguments; - pos_comma = strchr (arguments, ','); - if (pos_comma) - { - pos_nick = pos_comma + 1; - server = weechat_strndup (arguments, pos_comma - arguments); - if (server) - { - ptr_server = irc_server_search (server); - free (server); - } - } - - return irc_nick_find_color (ptr_server, pos_nick); + return irc_nick_find_color (arguments); } /* @@ -235,10 +217,6 @@ irc_info_info_irc_nick_color_name_cb (const void *pointer, void *data, const char *info_name, const char *arguments) { - char *pos_comma, *server; - const char *pos_nick; - struct t_irc_server *ptr_server; - /* make C compiler happy */ (void) pointer; (void) data; @@ -247,21 +225,7 @@ irc_info_info_irc_nick_color_name_cb (const void *pointer, void *data, if (!arguments || !arguments[0]) return NULL; - ptr_server = NULL; - pos_nick = arguments; - pos_comma = strchr (arguments, ','); - if (pos_comma) - { - pos_nick = pos_comma + 1; - server = weechat_strndup (arguments, pos_comma - arguments); - if (server) - { - ptr_server = irc_server_search (server); - free (server); - } - } - - return irc_nick_find_color_name (ptr_server, pos_nick); + return irc_nick_find_color_name (arguments); } /* @@ -1259,19 +1223,15 @@ irc_info_init () &irc_info_info_irc_nick_from_host_cb, NULL, NULL); weechat_hook_info ( "irc_nick_color", - N_("get nick color code, ignoring case (this calls the info " - "\"nick_color_ignore_case\" with appropriate range, according " - "to the value of CASEMAPPING on the server, " - "defaulting to \"rfc1459\" if the server is not given)"), - N_("server,nickname (server is optional)"), + N_("get nick color code " + "(*deprecated* since version 1.5, replaced by \"nick_color\")"), + N_("nickname"), &irc_info_info_irc_nick_color_cb, NULL, NULL); weechat_hook_info ( "irc_nick_color_name", - N_("get nick color name, ignoring case (this calls the info " - "\"nick_color_name_ignore_case\" with appropriate range, according " - "to the value of CASEMAPPING on the server, " - "defaulting to \"rfc1459\" if the server is not given)"), - N_("server,nickname (server is optional)"), + N_("get nick color name " + "(*deprecated* since version 1.5, replaced by \"nick_color_name\")"), + N_("nickname"), &irc_info_info_irc_nick_color_name_cb, NULL, NULL); weechat_hook_info ( "irc_buffer", |