summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/inbound.c1
-rw-r--r--src/common/proto-irc.c7
-rw-r--r--src/common/userlist.c3
3 files changed, 9 insertions, 2 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c
index 0d24532f..7dc332b3 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -1725,6 +1725,7 @@ static const char * const supported_caps[] = {
 	"server-time",
 	"userhost-in-names",
 	"cap-notify",
+	"chghost",
 
 	/* ZNC */
 	"znc.in/server-time-iso",
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 4174e182..180a3e43 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1147,7 +1147,12 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 		case WORDL('A', 'U', 'T', 'H'):
 			inbound_sasl_authenticate (sess->server, word_eol[3]);
 			return;
-			
+
+		case WORDL('C', 'H', 'G', 'H'):
+			inbound_user_info (sess, NULL, word[3], word[4], NULL, nick, NULL,
+							   NULL, 0xff, tags_data);
+			return;
+
 		case WORDL('I','N','V','I'):
 			if (ignore_check (word[1], IG_INVI))
 				return;
diff --git a/src/common/userlist.c b/src/common/userlist.c
index 54ed6f03..da40ff14 100644
--- a/src/common/userlist.c
+++ b/src/common/userlist.c
@@ -123,10 +123,11 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
 	user = userlist_find (sess, nick);
 	if (user)
 	{
-		if (!user->hostname && hostname)
+		if (hostname && (!user->hostname || strcmp(user->hostname, hostname)))
 		{
 			if (prefs.hex_gui_ulist_show_hosts)
 				do_rehash = TRUE;
+			g_free (user->hostname);
 			user->hostname = g_strdup (hostname);
 		}
 		if (!user->realname && realname && *realname)