mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 04:13:32 +02:00
Support for multiple identical nicknames.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1241 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
c2a1971cc3
commit
6a469c46bb
4 changed files with 173 additions and 8 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ void nicklist_update_flags(SERVER_REC *server, const char *nick,
|
|||
void nicklist_update_flags_unique(SERVER_REC *server, void *id,
|
||||
int gone, int ircop);
|
||||
|
||||
/* Specify which nick in channel is ours */
|
||||
void nicklist_set_own(CHANNEL_REC *channel, NICK_REC *nick);
|
||||
|
||||
/* Nick record comparision for sort functions */
|
||||
int nicklist_compare(NICK_REC *p1, NICK_REC *p2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue