Add support for chghost

This commit is contained in:
Patrick Griffis 2016-01-29 14:02:40 -05:00
parent 981d55e84c
commit 8da205b0a8
3 changed files with 9 additions and 2 deletions

View File

@ -1725,6 +1725,7 @@ static const char * const supported_caps[] = {
"server-time",
"userhost-in-names",
"cap-notify",
"chghost",
/* ZNC */
"znc.in/server-time-iso",

View File

@ -1148,6 +1148,11 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
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;

View File

@ -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)