mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 04:16:38 +02:00
xfer: fix auto-accept of server/nick when the server name contains UTF-8 chars (issue #1739)
This commit is contained in:
@@ -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::
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user