mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-26 11:12:19 -05:00
Only split NAMES reply if server supports userhost-in-names
This commit is contained in:
parent
06a7d84b43
commit
ad1520b29a
@ -693,14 +693,18 @@ inbound_nameslist (server *serv, char *chan, char *names,
|
|||||||
for (i = 0; name_list[i]; i++)
|
for (i = 0; name_list[i]; i++)
|
||||||
{
|
{
|
||||||
host = NULL;
|
host = NULL;
|
||||||
|
offset = sizeof(name);
|
||||||
|
|
||||||
if (name_list[i][0] == 0)
|
if (name_list[i][0] == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (serv->have_uhnames)
|
||||||
|
{
|
||||||
/* Server may have userhost-in-names cap */
|
/* Server may have userhost-in-names cap */
|
||||||
offset = strcspn (name_list[i], "!");
|
offset = strcspn (name_list[i], "!");
|
||||||
if (offset++ < strlen (name_list[i]))
|
if (offset++ < strlen (name_list[i]))
|
||||||
host = name_list[i] + offset;
|
host = name_list[i] + offset;
|
||||||
|
}
|
||||||
|
|
||||||
g_strlcpy (name, name_list[i], MIN(offset, sizeof(name)));
|
g_strlcpy (name, name_list[i], MIN(offset, sizeof(name)));
|
||||||
|
|
||||||
@ -1595,6 +1599,11 @@ inbound_cap_ack (server *serv, char *nick, char *extensions,
|
|||||||
serv->have_extjoin = TRUE;
|
serv->have_extjoin = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strstr (extensions, "userhost-in-names") != NULL)
|
||||||
|
{
|
||||||
|
serv->have_uhnames = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (strstr (extensions, "server-time") != NULL)
|
if (strstr (extensions, "server-time") != NULL)
|
||||||
{
|
{
|
||||||
serv->have_server_time = TRUE;
|
serv->have_server_time = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user