diff options
author | Timo Sirainen <cras@irssi.org> | 2001-02-18 22:46:25 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-02-18 22:46:25 +0000 |
commit | 6a469c46bb078f0f0c3efac45fa2ba1e2c7d4047 (patch) | |
tree | cdc7062f789b63f4a34d14c39e43f164f1e2582c /src/core/nicklist.c | |
parent | c2a1971cc3001793454c3175b2134b54375ddd82 (diff) | |
download | irssi-6a469c46bb078f0f0c3efac45fa2ba1e2c7d4047.zip |
Support for multiple identical nicknames.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1241 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/nicklist.c')
-rw-r--r-- | src/core/nicklist.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c index ee9aee0d..118b6b48 100644 --- a/src/core/nicklist.c +++ b/src/core/nicklist.c @@ -389,6 +389,26 @@ void nicklist_update_flags_unique(SERVER_REC *server, void *id, nicklist_get_same_unique(server, id)); } +/* Specify which nick in channel is ours */ +void nicklist_set_own(CHANNEL_REC *channel, NICK_REC *nick) +{ + NICK_REC *first, *next; + + channel->ownnick = nick; + + /* move our nick in the list to first, makes some things easier + (like handling multiple identical nicks in fe-messages.c) */ + first = g_hash_table_lookup(channel->nicks, nick->nick); + if (first->next == NULL) + return; + + next = nick->next; + nick->next = first; + first->next = next; + + g_hash_table_insert(channel->nicks, nick->nick, nick); +} + static void sig_channel_created(CHANNEL_REC *channel) { g_return_if_fail(IS_CHANNEL(channel)); |