From 8da205b0a86c94fabb543ad7f8b37feff2b27842 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 29 Jan 2016 14:02:40 -0500 Subject: Add support for chghost --- src/common/inbound.c | 1 + src/common/proto-irc.c | 7 ++++++- src/common/userlist.c | 3 ++- 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) -- cgit 1.4.1