summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-21 00:49:52 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-21 00:49:52 +0000
commit443ba1a97da454bbc4fb0439573e00b0225728a7 (patch)
tree35ccdad6d5cf9b7caa2d3ffa187ff2e6007261e7 /src/irc
parent1157ed58006ec137e81a270ecdfb043e003f55d4 (diff)
downloadirssi-443ba1a97da454bbc4fb0439573e00b0225728a7.zip
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
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-nicklist.c7
-rw-r--r--src/irc/core/massjoin.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index 245d1fdd..807934d2 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -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);
diff --git a/src/irc/core/massjoin.c b/src/irc/core/massjoin.c
index 701d2a33..1c7d55fb 100644
--- a/src/irc/core/massjoin.c
+++ b/src/irc/core/massjoin.c
@@ -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 */