summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/common/inbound.c1
-rw-r--r--src/common/proto-irc.c5
-rw-r--r--src/common/userlist.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c
index 71c60357..a7cf51a4 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -1724,6 +1724,7 @@ static const char * const supported_caps[] = {
 	"userhost-in-names",
 	"cap-notify",
 	"chghost",
+	"setname",
 
 	/* ZNC */
 	"znc.in/server-time-iso",
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index fa2d822b..e3f4a962 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1157,6 +1157,11 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 							   NULL, 0xff, tags_data);
 			return;
 
+		case WORDL('S', 'E', 'T', 'N'):
+			inbound_user_info (sess, NULL, NULL, NULL, NULL, nick, STRIP_COLON(word, word_eol, 3),
+							   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 0f28a000..17719ff6 100644
--- a/src/common/userlist.c
+++ b/src/common/userlist.c
@@ -130,8 +130,11 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
 			g_free (user->hostname);
 			user->hostname = g_strdup (hostname);
 		}
-		if (!user->realname && realname && *realname)
+		if (realname && *realname && g_strcmp0 (user->realname, realname) != 0)
+		{
+			g_free (user->realname);
 			user->realname = g_strdup (realname);
+		}
 		if (!user->servername && servername)
 			user->servername = g_strdup (servername);
 		if (!user->account && account && strcmp (account, "0") != 0)