diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-24 18:19:32 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-24 18:19:32 +0200 |
commit | 5d9af2902450cc8a3e181a515f13e86a26aa591d (patch) | |
tree | 92b031e47751d44a565b8ceeff69404386f1e068 /src/plugins/irc/irc-server.c | |
parent | 965c6ac2ea6c42eb3031dc4193fb7cbb7637f193 (diff) | |
download | weechat-5d9af2902450cc8a3e181a515f13e86a26aa591d.zip |
api: add infos "nick_color_ignore_case" and "nick_color_name_ignore_case" (issue #194)
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r-- | src/plugins/irc/irc-server.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 1c4106796..2cd37d1ff 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -334,72 +334,6 @@ irc_server_strncasecmp (struct t_irc_server *server, } /* - * Converts string to lower case, following server casemapping. - * - * Note: result must be freed after use. - */ - -char * -irc_server_string_tolower (struct t_irc_server *server, const char *string) -{ - char *result, *ptr_result; - int casemapping, range; - - if (!string) - return NULL; - - casemapping = (server) ? server->casemapping : -1; - if ((casemapping < 0) || (casemapping >= IRC_SERVER_NUM_CASEMAPPING)) - casemapping = IRC_SERVER_CASEMAPPING_RFC1459; - - range = irc_server_casemapping_range[casemapping]; - - result = strdup (string); - ptr_result = result; - while (ptr_result && ptr_result[0]) - { - if ((ptr_result[0] >= 'A') && (ptr_result[0] < 'A' + range)) - ptr_result[0] += ('a' - 'A'); - ptr_result = (char *)weechat_utf8_next_char (ptr_result); - } - - return result; -} - -/* - * Converts string to upper case, following server casemapping. - * - * Note: result must be freed after use. - */ - -char * -irc_server_string_toupper (struct t_irc_server *server, const char *string) -{ - char *result, *ptr_result; - int casemapping, range; - - if (!string) - return NULL; - - casemapping = (server) ? server->casemapping : -1; - if ((casemapping < 0) || (casemapping >= IRC_SERVER_NUM_CASEMAPPING)) - casemapping = IRC_SERVER_CASEMAPPING_RFC1459; - - range = irc_server_casemapping_range[casemapping]; - - result = strdup (string); - ptr_result = result; - while (ptr_result && ptr_result[0]) - { - if ((ptr_result[0] >= 'a') && (ptr_result[0] < 'a' + range)) - ptr_result[0] -= ('a' - 'A'); - ptr_result = (char *)weechat_utf8_next_char (ptr_result); - } - - return result; -} - -/* * Evaluates a string using the server as context: * ${irc_server.xxx} and ${server} are replaced by a server option and the * server name. |