diff options
author | Timo Sirainen <cras@irssi.org> | 2001-01-21 00:49:52 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-01-21 00:49:52 +0000 |
commit | 443ba1a97da454bbc4fb0439573e00b0225728a7 (patch) | |
tree | 35ccdad6d5cf9b7caa2d3ffa187ff2e6007261e7 /src/core/nicklist.c | |
parent | 1157ed58006ec137e81a270ecdfb043e003f55d4 (diff) | |
download | irssi-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/core/nicklist.c')
-rw-r--r-- | src/core/nicklist.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c index d5841b45..fe2a2842 100644 --- a/src/core/nicklist.c +++ b/src/core/nicklist.c @@ -57,6 +57,19 @@ NICK_REC *nicklist_insert(CHANNEL_REC *channel, const char *nick, return rec; } +/* Set host address for nick */ +void nicklist_set_host(CHANNEL_REC *channel, NICK_REC *nick, const char *host) +{ + g_return_if_fail(channel != NULL); + g_return_if_fail(nick != NULL); + g_return_if_fail(host != NULL); + + g_free_not_null(nick->host); + nick->host = g_strdup(host); + + signal_emit("nicklist host changed", 2, channel, nick); +} + static void nicklist_destroy(CHANNEL_REC *channel, NICK_REC *nick) { signal_emit("nicklist remove", 2, channel, nick); @@ -257,12 +270,12 @@ void nicklist_update_flags(SERVER_REC *server, const char *nick, if (gone != -1 && (int)rec->gone != gone) { rec->gone = gone; - signal_emit("nick gone changed", 2, channel, rec); + signal_emit("nicklist gone changed", 2, channel, rec); } if (serverop != -1 && (int)rec->serverop != serverop) { rec->serverop = serverop; - signal_emit("nick serverop changed", 2, channel, rec); + signal_emit("nicklist serverop changed", 2, channel, rec); } } g_slist_free(nicks); |