Fix updating the topic (user@host) of dialogs on CHGHOST.

This is updated when a user receives a new message but would have
not been updated when a user sent a CHGHOST.
This commit is contained in:
Sadie Powell 2022-11-02 14:35:23 +00:00 committed by Patrick
parent 9d175cc459
commit bb7a03e9f6
1 changed files with 8 additions and 1 deletions

View File

@ -1474,10 +1474,17 @@ inbound_user_info (session *sess, char *chan, char *user, char *host,
for (list = sess_list; list; list = list->next)
{
sess = list->data;
if (sess->type == SESS_CHANNEL && sess->server == serv)
if (sess->server != serv)
continue;
if (sess->type == SESS_CHANNEL)
{
userlist_add_hostname (sess, nick, uhost, realname, servname, account, away);
}
else if (sess->type == SESS_DIALOG && uhost && !serv->p_cmp (sess->channel, nick))
{
set_topic (sess, uhost, uhost);
}
}
}