From bb7a03e9f68a775ca93dd6ad8ea61e4f1d2ba81b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 2 Nov 2022 14:35:23 +0000 Subject: [PATCH] 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. --- src/common/inbound.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/inbound.c b/src/common/inbound.c index d4b5a32e..a591dc48 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -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); + } } }