1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Show voices in netsplits. Fix voices breaking netjoins. Patch by Maarten van

der Zwaart.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3125 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2003-07-09 23:36:05 +00:00 committed by cras
parent a619fe9a2c
commit 3906eead14
2 changed files with 19 additions and 1 deletions

View File

@ -325,11 +325,27 @@ static int netjoin_set_nickmode(NETJOIN_REC *rec, const char *channel,
char mode)
{
GSList *pos;
char oldmode = 0;
for (pos = rec->now_channels; pos != NULL; pos = pos->next) {
char *chan = pos->data;
char *realchannel = chan +
(isnickflag(*chan) && ischannel(chan[1]));
if (strcasecmp(realchannel, channel) == 0) {
if (strcasecmp(chan, channel) != 0)
oldmode = chan[0];
break;
}
}
pos = gslist_find_icase_string(rec->now_channels, channel);
if (pos == NULL)
return FALSE;
if (oldmode == '@')
return TRUE;
if (oldmode == '%' && mode == '+')
return TRUE;
g_free(pos->data);
pos->data = g_strdup_printf("%c%s", mode, channel);
return TRUE;

View File

@ -132,6 +132,8 @@ static void get_server_splits(void *key, NETSPLIT_REC *split,
chanrec->nick_count <= netsplit_nicks_hide_threshold) {
if (splitchan->op)
g_string_append_c(chanrec->nicks, '@');
else if (splitchan->voice)
g_string_append_c(chanrec->nicks, '+');
g_string_sprintfa(chanrec->nicks, "%s, ", split->nick);
if (chanrec->nick_count == netsplit_max_nicks)