mirror of
https://github.com/irssi/irssi.git
synced 2024-09-08 04:26:01 -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:
parent
a619fe9a2c
commit
3906eead14
@ -325,11 +325,27 @@ static int netjoin_set_nickmode(NETJOIN_REC *rec, const char *channel,
|
|||||||
char mode)
|
char mode)
|
||||||
{
|
{
|
||||||
GSList *pos;
|
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)
|
if (pos == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (oldmode == '@')
|
||||||
|
return TRUE;
|
||||||
|
if (oldmode == '%' && mode == '+')
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
g_free(pos->data);
|
g_free(pos->data);
|
||||||
pos->data = g_strdup_printf("%c%s", mode, channel);
|
pos->data = g_strdup_printf("%c%s", mode, channel);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -132,6 +132,8 @@ static void get_server_splits(void *key, NETSPLIT_REC *split,
|
|||||||
chanrec->nick_count <= netsplit_nicks_hide_threshold) {
|
chanrec->nick_count <= netsplit_nicks_hide_threshold) {
|
||||||
if (splitchan->op)
|
if (splitchan->op)
|
||||||
g_string_append_c(chanrec->nicks, '@');
|
g_string_append_c(chanrec->nicks, '@');
|
||||||
|
else if (splitchan->voice)
|
||||||
|
g_string_append_c(chanrec->nicks, '+');
|
||||||
g_string_sprintfa(chanrec->nicks, "%s, ", split->nick);
|
g_string_sprintfa(chanrec->nicks, "%s, ", split->nick);
|
||||||
|
|
||||||
if (chanrec->nick_count == netsplit_max_nicks)
|
if (chanrec->nick_count == netsplit_max_nicks)
|
||||||
|
Loading…
Reference in New Issue
Block a user