diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 225e23bae..b3ecd1f0f 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -35,6 +35,7 @@ Bug fixes:: * irc: fix display of message 344 received as whois geo info (issue #1736) * irc: fix display of IRC numeric messages with no parameters * trigger: fix search of triggers with UTF-8 chars in name (issue #1739) + * xfer: fix auto-accept of server/nick when the server name contains UTF-8 chars (issue #1739) Tests:: diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 447dbc92c..2b59ccafe 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -560,7 +560,7 @@ xfer_alloc () int xfer_nick_auto_accepted (const char *server, const char *nick) { - int rc, num_nicks, i; + int rc, i, num_nicks, num_chars; char **nicks, *pos; rc = 0; @@ -581,7 +581,8 @@ xfer_nick_auto_accepted (const char *server, const char *nick) pos = strrchr (nicks[i], '.'); if (pos) { - if ((weechat_strncasecmp (server, nicks[i], pos - nicks[i]) == 0) + num_chars = weechat_utf8_pos (nicks[i], pos - nicks[i]); + if ((weechat_strncasecmp (server, nicks[i], num_chars) == 0) && (weechat_strcasecmp (nick, pos + 1) == 0)) { rc = 1; |