mirror of
https://github.com/moparisthebest/hexchat
synced 2024-12-23 08:08:54 -05:00
Ignore nick prefix when splitting NAMES reply
This commit is contained in:
parent
ad1520b29a
commit
20c9c94a61
@ -668,7 +668,7 @@ inbound_nameslist (server *serv, char *chan, char *names,
|
|||||||
{
|
{
|
||||||
session *sess;
|
session *sess;
|
||||||
char **name_list;
|
char **name_list;
|
||||||
char *host;
|
char *host, *nopre_name;
|
||||||
char name[NICKLEN];
|
char name[NICKLEN];
|
||||||
int i, offset;
|
int i, offset;
|
||||||
|
|
||||||
@ -700,8 +700,17 @@ inbound_nameslist (server *serv, char *chan, char *names,
|
|||||||
|
|
||||||
if (serv->have_uhnames)
|
if (serv->have_uhnames)
|
||||||
{
|
{
|
||||||
/* Server may have userhost-in-names cap */
|
offset = 0;
|
||||||
offset = strcspn (name_list[i], "!");
|
nopre_name = name_list[i];
|
||||||
|
|
||||||
|
/* Ignore prefixes so '!' won't cause issues */
|
||||||
|
while (strchr (serv->nick_prefixes, *nopre_name) != NULL)
|
||||||
|
{
|
||||||
|
*nopre_name++;
|
||||||
|
offset++;
|
||||||
|
}
|
||||||
|
|
||||||
|
offset += strcspn (nopre_name, "!");
|
||||||
if (offset++ < strlen (name_list[i]))
|
if (offset++ < strlen (name_list[i]))
|
||||||
host = name_list[i] + offset;
|
host = name_list[i] + offset;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user