nickliset_set_host() for setting host, sends signal "nicklist host changed".

Changed "nick gone|serverop" -> "nicklist gone|serverop changed"


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1137 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-21 00:49:52 +00:00 committed by cras
commit 443ba1a97d
4 changed files with 23 additions and 5 deletions

View file

@ -134,8 +134,11 @@ static void event_who(SERVER_REC *server, const char *data)
nickrec = chanrec == NULL ? NULL :
nicklist_find(chanrec, nick);
if (nickrec != NULL) {
if (nickrec->host == NULL)
nickrec->host = g_strdup_printf("%s@%s", user, host);
if (nickrec->host == NULL) {
char *str = g_strdup_printf("%s@%s", user, host);
nicklist_set_host(chanrec, nickrec, str);
g_free(str);
}
if (nickrec->realname == NULL)
nickrec->realname = g_strdup(realname);
sscanf(hops, "%d", &nickrec->hops);

View file

@ -59,7 +59,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
/* add user to nicklist */
nickrec = nicklist_insert(CHANNEL(chanrec), nick, FALSE, FALSE, TRUE);
nickrec->host = g_strdup(address);
nicklist_set_host(CHANNEL(chanrec), nickrec, address);
if (chanrec->massjoins == 0) {
/* no nicks waiting in massjoin queue */