Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 5385
Collapse All | Expand All

(-)irssi-0.8.5/default.theme (+2 lines)
Lines 222-227 Link Here
222
  # /names list
222
  # /names list
223
  names_prefix = "";
223
  names_prefix = "";
224
  names_nick = "[%_$0%_$1-] ";
224
  names_nick = "[%_$0%_$1-] ";
225
  names_nick_founder = "{names_nick $*}";
226
  names_nick_admin = "{names_nick $*}";
225
  names_nick_op = "{names_nick $*}";
227
  names_nick_op = "{names_nick $*}";
226
  names_nick_halfop = "{names_nick $*}";
228
  names_nick_halfop = "{names_nick $*}";
227
  names_nick_voice = "{names_nick $*}";
229
  names_nick_voice = "{names_nick $*}";
(-)irssi-0.8.5/src/core/channels.c (-3 / +5 lines)
Lines 188-197 Link Here
188
	const char *flags = server->get_nick_flags();
188
	const char *flags = server->get_nick_flags();
189
189
190
	return strchr(flags, flag) == NULL ||
190
	return strchr(flags, flag) == NULL ||
191
		(flag == flags[0] && nick->op) ||
191
		(flag == flags[0] && (nick->op || nick->admin || nick->founder)) ||
192
		(flag == flags[1] && (nick->voice || nick->halfop ||
192
		(flag == flags[1] && (nick->voice || nick->halfop ||
193
				      nick->op)) ||
193
				      nick->op || nick->admin || nick->founder)) ||
194
		(flag == flags[2] && (nick->halfop || nick->op));
194
		(flag == flags[2] && (nick->halfop || nick->op || nick->admin || nick->founder)) ||
195
                (flag == flags[3] && (nick->admin || nick->founder )) ||
196
                (flag == flags[4] && nick->founder);
195
}
197
}
196
198
197
/* Send the auto send command to channel */
199
/* Send the auto send command to channel */
(-)irssi-0.8.5/src/core/nicklist.c (-2 / +10 lines)
Lines 369-375 Link Here
369
	 * returns :-)
369
	 * returns :-)
370
	 * -- yath */
370
	 * -- yath */
371
371
372
	if (p1->op)
372
        if (p1->founder)
373
                status1 = 6;
374
        else if (p1->admin)
375
                status1 = 5;
376
        else if (p1->op)
373
		status1 = 4;
377
		status1 = 4;
374
	else if (p1->halfop)
378
	else if (p1->halfop)
375
		status1 = 3;
379
		status1 = 3;
Lines 378-384 Link Here
378
	else
382
	else
379
		status1 = 1;
383
		status1 = 1;
380
384
381
	if (p2->op)
385
        if (p2->founder)
386
                status2 = 6;
387
        else if (p2->admin)
388
                status2 = 5;
389
        else if (p2->op)
382
		status2 = 4;
390
		status2 = 4;
383
	else if (p2->halfop)
391
	else if (p2->halfop)
384
		status2 = 3;
392
		status2 = 3;
(-)irssi-0.8.5/src/core/nick-rec.h (+2 lines)
Lines 16-21 Link Here
16
16
17
/* status in channel */
17
/* status in channel */
18
unsigned int send_massjoin:1; /* Waiting to be sent in massjoin signal */
18
unsigned int send_massjoin:1; /* Waiting to be sent in massjoin signal */
19
unsigned int founder:1;
20
unsigned int admin:1;
19
unsigned int op:1;
21
unsigned int op:1;
20
unsigned int halfop:1;
22
unsigned int halfop:1;
21
unsigned int voice:1;
23
unsigned int voice:1;
(-)irssi-0.8.5/src/fe-common/core/fe-channels.c (-8 / +26 lines)
Lines 397-403 Link Here
397
	for (tmp = nicklist; tmp != NULL; tmp = tmp->next) {
397
	for (tmp = nicklist; tmp != NULL; tmp = tmp->next) {
398
		NICK_REC *rec = tmp->data;
398
		NICK_REC *rec = tmp->data;
399
399
400
		if (rec->op)
400
                if (rec->founder) 
401
                        nickmode[0] = '*';
402
                else if (rec->admin)
403
                        nickmode[0] = '!';
404
                else if (rec->op)
401
			nickmode[0] = '@';
405
			nickmode[0] = '@';
402
		else if (rec->halfop)
406
		else if (rec->halfop)
403
			nickmode[0] = '%';
407
			nickmode[0] = '%';
Lines 414-420 Link Here
414
		linebuf[columns[col]-item_extra] = '\0';
418
		linebuf[columns[col]-item_extra] = '\0';
415
		memcpy(linebuf, rec->nick, strlen(rec->nick));
419
		memcpy(linebuf, rec->nick, strlen(rec->nick));
416
420
417
		formatnum = rec->op ? TXT_NAMES_NICK_OP :
421
		formatnum = rec->founder ? TXT_NAMES_NICK_FOUNDER :
422
                        rec-> admin ? TXT_NAMES_NICK_ADMIN :
423
                        rec->op ? TXT_NAMES_NICK_OP :
418
			rec->halfop ? TXT_NAMES_NICK_HALFOP :
424
			rec->halfop ? TXT_NAMES_NICK_HALFOP :
419
			rec->voice ? TXT_NAMES_NICK_VOICE :
425
			rec->voice ? TXT_NAMES_NICK_VOICE :
420
                        TXT_NAMES_NICK;
426
                        TXT_NAMES_NICK;
Lines 453-461 Link Here
453
{
459
{
454
	NICK_REC *nick;
460
	NICK_REC *nick;
455
	GSList *tmp, *nicklist, *sorted;
461
	GSList *tmp, *nicklist, *sorted;
456
	int nicks, normal, voices, halfops, ops;
462
	int nicks, normal, voices, halfops, ops, founders, admins;
457
463
458
	nicks = normal = voices = halfops = ops = 0;
464
	nicks = normal = voices = halfops = ops = founders = admins = 0;
459
	nicklist = nicklist_getnicks(channel);
465
	nicklist = nicklist_getnicks(channel);
460
	sorted = NULL;
466
	sorted = NULL;
461
467
Lines 464-470 Link Here
464
		nick = tmp->data;
470
		nick = tmp->data;
465
471
466
		nicks++;
472
		nicks++;
467
		if (nick->op) {
473
                if (nick->founder) {
474
                        founders++;
475
                        if ((flags & CHANNEL_NICKLIST_FLAG_FOUNDERS) == 0)
476
                                continue;
477
                } else if (nick->admin) {
478
                        admins++;
479
                        if ((flags & CHANNEL_NICKLIST_FLAG_ADMINS) == 0)
480
                            continue;
481
		} else if (nick->op) {
468
			ops++;
482
			ops++;
469
			if ((flags & CHANNEL_NICKLIST_FLAG_OPS) == 0)
483
			if ((flags & CHANNEL_NICKLIST_FLAG_OPS) == 0)
470
                                continue;
484
                                continue;
Lines 490-503 Link Here
490
	/* display the nicks */
504
	/* display the nicks */
491
        if ((flags & CHANNEL_NICKLIST_FLAG_COUNT) == 0) {
505
        if ((flags & CHANNEL_NICKLIST_FLAG_COUNT) == 0) {
492
		printformat(channel->server, channel->name,
506
		printformat(channel->server, channel->name,
493
			    MSGLEVEL_CLIENTCRAP, TXT_NAMES, channel->name, nicks, ops, halfops, voices, normal);
507
			    MSGLEVEL_CLIENTCRAP, TXT_NAMES, channel->name, nicks, founders, admins, ops, halfops, voices, normal);
494
		display_sorted_nicks(channel, sorted);
508
		display_sorted_nicks(channel, sorted);
495
	}
509
	}
496
	g_slist_free(sorted);
510
	g_slist_free(sorted);
497
511
498
	printformat(channel->server, channel->name,
512
	printformat(channel->server, channel->name,
499
		    MSGLEVEL_CLIENTNOTICE, TXT_ENDOFNAMES,
513
		    MSGLEVEL_CLIENTNOTICE, TXT_ENDOFNAMES,
500
		    channel->name, nicks, ops, halfops, voices, normal);
514
		    channel->name, nicks, founders, admins, ops, halfops, voices, normal);
501
}
515
}
502
516
503
/* SYNTAX: NAMES [-count | -ops -halfops -voices -normal] [<channels> | **] */
517
/* SYNTAX: NAMES [-count | -ops -halfops -voices -normal] [<channels> | **] */
Lines 526-531 Link Here
526
	}
540
	}
527
541
528
	flags = 0;
542
	flags = 0;
543
        if (g_hash_table_lookup(optlist, "founders") != NULL)
544
                flags |= CHANNEL_NICKLIST_FLAG_FOUNDERS;
545
        if (g_hash_table_lookup(optlist, "admins") != NULL)
546
                flags |= CHANNEL_NICKLIST_FLAG_ADMINS;
529
	if (g_hash_table_lookup(optlist, "ops") != NULL)
547
	if (g_hash_table_lookup(optlist, "ops") != NULL)
530
		flags |= CHANNEL_NICKLIST_FLAG_OPS;
548
		flags |= CHANNEL_NICKLIST_FLAG_OPS;
531
	if (g_hash_table_lookup(optlist, "halfops") != NULL)
549
	if (g_hash_table_lookup(optlist, "halfops") != NULL)
Lines 620-626 Link Here
620
	command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);
638
	command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);
621
639
622
	command_set_options("channel add", "auto noauto -bots -botcmd");
640
	command_set_options("channel add", "auto noauto -bots -botcmd");
623
	command_set_options("names", "count ops halfops voices normal");
641
	command_set_options("names", "count owners admins ops halfops voices normal");
624
	command_set_options("join", "window");
642
	command_set_options("join", "window");
625
}
643
}
626
644
(-)irssi-0.8.5/src/fe-common/core/fe-channels.h (-2 / +4 lines)
Lines 5-12 Link Here
5
#define CHANNEL_NICKLIST_FLAG_HALFOPS   0x02
5
#define CHANNEL_NICKLIST_FLAG_HALFOPS   0x02
6
#define CHANNEL_NICKLIST_FLAG_VOICES    0x04
6
#define CHANNEL_NICKLIST_FLAG_VOICES    0x04
7
#define CHANNEL_NICKLIST_FLAG_NORMAL    0x08
7
#define CHANNEL_NICKLIST_FLAG_NORMAL    0x08
8
#define CHANNEL_NICKLIST_FLAG_ALL       0x0f
8
#define CHANNEL_NICKLIST_FLAG_FOUNDERS 0x10
9
#define CHANNEL_NICKLIST_FLAG_COUNT     0x10
9
#define CHANNEL_NICKLIST_FLAG_ADMINS   0x20
10
#define CHANNEL_NICKLIST_FLAG_ALL       0x3f
11
#define CHANNEL_NICKLIST_FLAG_COUNT     0x40
10
12
11
void fe_channels_nicklist(CHANNEL_REC *channel, int flags);
13
void fe_channels_nicklist(CHANNEL_REC *channel, int flags);
12
14
(-)irssi-0.8.5/src/fe-common/core/fe-messages.c (+2 lines)
Lines 123-128 Link Here
123
        emptystr = settings_get_bool("show_nickmode_empty") ? " " : "";
123
        emptystr = settings_get_bool("show_nickmode_empty") ? " " : "";
124
124
125
	return nickrec == NULL ? emptystr :
125
	return nickrec == NULL ? emptystr :
126
                nickrec->founder ? "*" :
127
                nickrec->admin ? "!" :
126
		nickrec->op ? "@" :
128
		nickrec->op ? "@" :
127
		nickrec->halfop ? "%" :
129
		nickrec->halfop ? "%" :
128
		nickrec->voice ? "+" :
130
		nickrec->voice ? "+" :
(-)irssi-0.8.5/src/fe-common/core/module-formats.c (-1 / +3 lines)
Lines 109-119 Link Here
109
	{ "current_channel", "Current channel {channel $0}", 1, { 0 } },
109
	{ "current_channel", "Current channel {channel $0}", 1, { 0 } },
110
	{ "names", "{names_users Users {names_channel $0}}", 6, { 0, 1, 1, 1, 1, 1 } },
110
	{ "names", "{names_users Users {names_channel $0}}", 6, { 0, 1, 1, 1, 1, 1 } },
111
	{ "names_prefix", "{names_prefix $0}", 1, { 0 } },
111
	{ "names_prefix", "{names_prefix $0}", 1, { 0 } },
112
        { "names_nick_founder", "{names_nick_founder $0 $1}", 2, { 0, 0 } },
113
        { "names_nick_admin", "{names_nick_admin $0 $1}", 2, { 0, 0 } },
112
        { "names_nick_op", "{names_nick_op $0 $1}", 2, { 0, 0 } },
114
        { "names_nick_op", "{names_nick_op $0 $1}", 2, { 0, 0 } },
113
        { "names_nick_halfop", "{names_nick_halfop $0 $1}", 2, { 0, 0 } },
115
        { "names_nick_halfop", "{names_nick_halfop $0 $1}", 2, { 0, 0 } },
114
        { "names_nick_voice", "{names_nick_voice $0 $1}", 2, { 0, 0 } },
116
        { "names_nick_voice", "{names_nick_voice $0 $1}", 2, { 0, 0 } },
115
        { "names_nick", "{names_nick $0 $1}", 2, { 0, 0 } },
117
        { "names_nick", "{names_nick $0 $1}", 2, { 0, 0 } },
116
        { "endofnames", "{channel $0}: Total of {hilight $1} nicks {comment {hilight $2} ops, {hilight $3} halfops, {hilight $4} voices, {hilight $5} normal}", 6, { 0, 1, 1, 1, 1, 1 } },
118
        { "endofnames", "{channel $0}: Total of {hilight $1} nicks {comment {hilight $2} owners, {hilight $3} admins, {hilight $4} ops, {hilight $5} halfops, {hilight $6} voices, {hilight $7} normal}", 8, { 0, 1, 1, 1, 1, 1, 1, 1 } },
117
	{ "chanlist_header", "You are on the following channels:", 0 },
119
	{ "chanlist_header", "You are on the following channels:", 0 },
118
	{ "chanlist_line", "{channel $[-10]0} %|+$1 ($2): $3", 4, { 0, 0, 0, 0 } },
120
	{ "chanlist_line", "{channel $[-10]0} %|+$1 ($2): $3", 4, { 0, 0, 0, 0 } },
119
	{ "chansetup_not_found", "Channel {channel $0} not found", 2, { 0, 0 } },
121
	{ "chansetup_not_found", "Channel {channel $0} not found", 2, { 0, 0 } },
(-)irssi-0.8.5/src/fe-common/core/module-formats.h (+2 lines)
Lines 85-90 Link Here
85
	TXT_CURRENT_CHANNEL,
85
	TXT_CURRENT_CHANNEL,
86
	TXT_NAMES,
86
	TXT_NAMES,
87
	TXT_NAMES_PREFIX,
87
	TXT_NAMES_PREFIX,
88
        TXT_NAMES_NICK_FOUNDER,
89
        TXT_NAMES_NICK_ADMIN,
88
	TXT_NAMES_NICK_OP,
90
	TXT_NAMES_NICK_OP,
89
	TXT_NAMES_NICK_HALFOP,
91
	TXT_NAMES_NICK_HALFOP,
90
	TXT_NAMES_NICK_VOICE,
92
	TXT_NAMES_NICK_VOICE,
(-)irssi-0.8.5/src/fe-common/irc/fe-netjoin.c (-2 / +2 lines)
Lines 337-345 Link Here
337
}
337
}
338
338
339
#define isnickmode(c) \
339
#define isnickmode(c) \
340
	((c) == 'o' || (c) == 'v' || (c) == 'h')
340
	((c) == 'q' || (c) == 'a' || (c) == 'o' || (c) == 'v' || (c) == 'h')
341
#define nickmodechar(c) \
341
#define nickmodechar(c) \
342
	((c) == 'o' ? '@' : ((c) == 'v' ? '+' : ((c) == 'h' ? '%' : '\0')))
342
	((c) == 'q' ? '*' : (c) == 'a' ? '!' : (c) == 'o' ? '@' : ((c) == 'v' ? '+' : ((c) == 'h' ? '%' : '\0')))
343
343
344
static void msg_mode(IRC_SERVER_REC *server, const char *channel,
344
static void msg_mode(IRC_SERVER_REC *server, const char *channel,
345
		     const char *sender, const char *addr, const char *data)
345
		     const char *sender, const char *addr, const char *data)
(-)irssi-0.8.5/src/irc/core/irc-expandos.c (-2 / +4 lines)
Lines 82-92 Link Here
82
	return IS_IRC_SERVER(server) ? IRC_SERVER(server)->usermode : "";
82
	return IS_IRC_SERVER(server) ? IRC_SERVER(server)->usermode : "";
83
}
83
}
84
84
85
/* expands to your usermode on channel, op '@', halfop '%', "+" voice */
85
/* expands to your usermode on channel, op '@', halfop '%', "+" voice ,...*/
86
static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret)
86
static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret)
87
{
87
{
88
	if (IS_CHANNEL(item) && CHANNEL(item)->ownnick) {
88
	if (IS_CHANNEL(item) && CHANNEL(item)->ownnick) {
89
		return NICK(CHANNEL(item)->ownnick)->op ? "@" :
89
		return NICK(CHANNEL(item)->ownnick)->founder ? "*" :
90
                       NICK(CHANNEL(item)->ownnick)->admin ? "!" :
91
                       NICK(CHANNEL(item)->ownnick)->op ? "@" :
90
		       NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
92
		       NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
91
		       NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
93
		       NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
92
	}
94
	}
(-)irssi-0.8.5/src/irc/core/irc.h (-1 / +2 lines)
Lines 21-27 Link Here
21
21
22
#define isnickflag(a) \
22
#define isnickflag(a) \
23
	((a) == '@' || (a) == '+' || (a) == '%' || /* op / voice */ \
23
	((a) == '@' || (a) == '+' || (a) == '%' || /* op / voice */ \
24
	(a) == '%' || (a) == '.') /* extensions: half-op / owner */
24
	(a) == '%' || (a) == '.' || /* extensions: half-op / owner */ \
25
        (a) == '*' || (a) == '!' ) /* more extensions: founder / admin */
25
26
26
#define ischannel(a) \
27
#define ischannel(a) \
27
	((a) == '#' || /* normal */ \
28
	((a) == '#' || /* normal */ \
(-)irssi-0.8.5/src/irc/core/irc-nicklist.c (-7 / +15 lines)
Lines 31-37 Link Here
31
31
32
/* Add new nick to list */
32
/* Add new nick to list */
33
NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
33
NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
34
			      int op, int halfop, int voice, int send_massjoin)
34
			      int founder, int admin, int op, int halfop, int voice, int send_massjoin)
35
{
35
{
36
	NICK_REC *rec;
36
	NICK_REC *rec;
37
37
Lines 41-46 Link Here
41
	rec = g_new0(NICK_REC, 1);
41
	rec = g_new0(NICK_REC, 1);
42
	rec->nick = g_strdup(nick);
42
	rec->nick = g_strdup(nick);
43
43
44
        if (founder) rec->founder = TRUE;
45
        if (admin) rec->admin = TRUE;
44
	if (op) rec->op = TRUE;
46
	if (op) rec->op = TRUE;
45
	if (halfop) rec->halfop = TRUE;
47
	if (halfop) rec->halfop = TRUE;
46
	if (voice) rec->voice = TRUE;
48
	if (voice) rec->voice = TRUE;
Lines 78-84 Link Here
78
{
80
{
79
	IRC_CHANNEL_REC *chanrec;
81
	IRC_CHANNEL_REC *chanrec;
80
	char *params, *type, *channel, *names, *ptr;
82
	char *params, *type, *channel, *names, *ptr;
81
        int op, halfop, voice;
83
        int founder, admin, op, halfop, voice;
82
84
83
	g_return_if_fail(data != NULL);
85
	g_return_if_fail(data != NULL);
84
86
Lines 117-125 Link Here
117
		   showing "@+nick" and since none of these chars are valid
119
		   showing "@+nick" and since none of these chars are valid
118
		   nick chars, just check them until a non-nickflag char is
120
		   nick chars, just check them until a non-nickflag char is
119
		   found. FIXME: we just ignore owner char now. */
121
		   found. FIXME: we just ignore owner char now. */
120
		op = halfop = voice = FALSE;
122
		founder = admin = op = halfop = voice = FALSE;
121
		while (isnickflag(*ptr)) {
123
		while (isnickflag(*ptr)) {
122
			switch (*ptr) {
124
			switch (*ptr) {
125
                        case '*':
126
                                founder = TRUE;
127
                                break;
128
                        case '!':
129
                                admin = TRUE;
130
                                break;
123
			case '@':
131
			case '@':
124
                                op = TRUE;
132
                                op = TRUE;
125
                                break;
133
                                break;
Lines 133-139 Link Here
133
                        ptr++;
141
                        ptr++;
134
		}
142
		}
135
143
136
		irc_nicklist_insert(chanrec, ptr, op, halfop, voice, FALSE);
144
		irc_nicklist_insert(chanrec, ptr, founder, admin, op, halfop, voice, FALSE);
137
	}
145
	}
138
146
139
	g_free(params);
147
	g_free(params);
Lines 158-165 Link Here
158
			   if channel is empty */
166
			   if channel is empty */
159
			nicks = g_hash_table_size(chanrec->nicks);
167
			nicks = g_hash_table_size(chanrec->nicks);
160
			ownnick = irc_nicklist_insert(chanrec, server->nick,
168
			ownnick = irc_nicklist_insert(chanrec, server->nick,
161
						      nicks == 0, FALSE,
169
						      nicks == 0, FALSE, FALSE,
162
						      FALSE, FALSE);
170
						      FALSE, FALSE, FALSE);
163
		}
171
		}
164
		nicklist_set_own(CHANNEL(chanrec), ownnick);
172
		nicklist_set_own(CHANNEL(chanrec), ownnick);
165
                chanrec->chanop = chanrec->ownnick->op;
173
                chanrec->chanop = chanrec->ownnick->op;
Lines 375-381 Link Here
375
383
376
static const char *get_nick_flags(void)
384
static const char *get_nick_flags(void)
377
{
385
{
378
        return "@+%";
386
        return "@+%!*";
379
}
387
}
380
388
381
static void sig_connected(IRC_SERVER_REC *server)
389
static void sig_connected(IRC_SERVER_REC *server)
(-)irssi-0.8.5/src/irc/core/irc-nicklist.h (-1 / +1 lines)
Lines 5-11 Link Here
5
5
6
/* Add new nick to list */
6
/* Add new nick to list */
7
NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
7
NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
8
			      int op, int halfop, int voice, int send_massjoin);
8
			      int founder, int admin, int op, int halfop, int voice, int send_massjoin);
9
9
10
/* Remove all "extra" characters from `nick'. Like _nick_ -> nick */
10
/* Remove all "extra" characters from `nick'. Like _nick_ -> nick */
11
char *irc_nick_strip(const char *nick);
11
char *irc_nick_strip(const char *nick);
(-)irssi-0.8.5/src/irc/core/irc-session.c (-2 / +4 lines)
Lines 75-81 Link Here
75
				     CONFIG_NODE *node)
75
				     CONFIG_NODE *node)
76
{
76
{
77
	const char *nick;
77
	const char *nick;
78
        int op, halfop, voice;
78
        int founder, admin, op, halfop, voice;
79
        NICK_REC *nickrec;
79
        NICK_REC *nickrec;
80
80
81
	if (!IS_IRC_CHANNEL(channel))
81
	if (!IS_IRC_CHANNEL(channel))
Lines 85-94 Link Here
85
	if (nick == NULL)
85
	if (nick == NULL)
86
                return;
86
                return;
87
87
88
        founder = config_node_get_bool(node, "founder", FALSE);
89
        admin = config_node_get_bool(node, "admin", FALSE);
88
	op = config_node_get_bool(node, "op", FALSE);
90
	op = config_node_get_bool(node, "op", FALSE);
89
        voice = config_node_get_bool(node, "voice", FALSE);
91
        voice = config_node_get_bool(node, "voice", FALSE);
90
        halfop = config_node_get_bool(node, "halfop", FALSE);
92
        halfop = config_node_get_bool(node, "halfop", FALSE);
91
	nickrec = irc_nicklist_insert(channel, nick, op, halfop, voice, FALSE);
93
	nickrec = irc_nicklist_insert(channel, nick, founder, admin, op, halfop, voice, FALSE);
92
}
94
}
93
95
94
static void session_restore_channel(IRC_CHANNEL_REC *channel)
96
static void session_restore_channel(IRC_CHANNEL_REC *channel)
(-)irssi-0.8.5/src/irc/core/massjoin.c (-1 / +1 lines)
Lines 65-71 Link Here
65
	}
65
	}
66
66
67
	/* add user to nicklist */
67
	/* add user to nicklist */
68
	nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, TRUE);
68
	nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE);
69
        nicklist_set_host(CHANNEL(chanrec), nickrec, address);
69
        nicklist_set_host(CHANNEL(chanrec), nickrec, address);
70
70
71
	if (chanrec->massjoins == 0) {
71
	if (chanrec->massjoins == 0) {
(-)irssi-0.8.5/src/irc/core/modes.c (-1 / +8 lines)
Lines 42-47 Link Here
42
	nickrec = nicklist_find(CHANNEL(channel), nick);
42
	nickrec = nicklist_find(CHANNEL(channel), nick);
43
	if (nickrec == NULL) return; /* No /names list got yet */
43
	if (nickrec == NULL) return; /* No /names list got yet */
44
44
45
        if (mode == '*') nickrec->founder = type == '+';
46
        if (mode == '!') nickrec->admin = type == '+';
45
	if (mode == '@') nickrec->op = type == '+';
47
	if (mode == '@') nickrec->op = type == '+';
46
	if (mode == '+') nickrec->voice = type == '+';
48
	if (mode == '+') nickrec->voice = type == '+';
47
	if (mode == '%') nickrec->halfop = type == '+';
49
	if (mode == '%') nickrec->halfop = type == '+';
Lines 232-237 Link Here
232
			else
234
			else
233
				banlist_remove(channel, arg);
235
				banlist_remove(channel, arg);
234
			break;
236
			break;
237
                case 'q':
238
                        nick_mode_change(channel, arg, '*', type);
239
                        break;
240
                case 'a':
241
                        nick_mode_change(channel, arg, '!', type);
242
                        break;
235
		case 'o':
243
		case 'o':
236
		case 'O': /* channel owner in !channels */
244
		case 'O': /* channel owner in !channels */
237
			if (g_strcasecmp(channel->server->nick, arg) == 0)
245
			if (g_strcasecmp(channel->server->nick, arg) == 0)
Lines 264-270 Link Here
264
			break;
272
			break;
265
		case 'e':
273
		case 'e':
266
		case 'I':
274
		case 'I':
267
		case 'q':
268
			/* Don't set it as channel mode */
275
			/* Don't set it as channel mode */
269
			break;
276
			break;
270
277
(-)irssi-0.8.5/src/irc/core/modes.h (-1 / +1 lines)
Lines 5-11 Link Here
5
#define HAS_MODE_ARG_ALWAYS(mode) \
5
#define HAS_MODE_ARG_ALWAYS(mode) \
6
	((mode) == 'b' || (mode) == 'e' || (mode) == 'I' || (mode) == 'q' || \
6
	((mode) == 'b' || (mode) == 'e' || (mode) == 'I' || (mode) == 'q' || \
7
        (mode) == 'd' || (mode) == 'o' || (mode) == 'h' || (mode) == 'v' || \
7
        (mode) == 'd' || (mode) == 'o' || (mode) == 'h' || (mode) == 'v' || \
8
        (mode) == 'O' || (mode) == 'k')
8
        (mode) == 'O' || (mode) == 'k' || (mode) == 'a')
9
9
10
/* modes that have argument when being set (+) */
10
/* modes that have argument when being set (+) */
11
#define HAS_MODE_ARG_SET(mode) \
11
#define HAS_MODE_ARG_SET(mode) \
(-)irssi-0.8.5/src/irc/core/netsplit.c (+2 lines)
Lines 137-142 Link Here
137
137
138
		splitchan = g_new0(NETSPLIT_CHAN_REC, 1);
138
		splitchan = g_new0(NETSPLIT_CHAN_REC, 1);
139
		splitchan->name = g_strdup(channel->name);
139
		splitchan->name = g_strdup(channel->name);
140
                splitchan->founder = nickrec->founder;
141
                splitchan->admin = nickrec->admin;
140
		splitchan->op = nickrec->op;
142
		splitchan->op = nickrec->op;
141
		splitchan->halfop = nickrec->halfop;
143
		splitchan->halfop = nickrec->halfop;
142
		splitchan->voice = nickrec->voice;
144
		splitchan->voice = nickrec->voice;
(-)irssi-0.8.5/src/irc/core/netsplit.h (+2 lines)
Lines 25-30 Link Here
25
25
26
typedef struct {
26
typedef struct {
27
	char *name;
27
	char *name;
28
        unsigned int founder:1;
29
        unsigned int admin:1;
28
	unsigned int op:1;
30
	unsigned int op:1;
29
	unsigned int halfop:1;
31
	unsigned int halfop:1;
30
	unsigned int voice:1;
32
	unsigned int voice:1;
(-)irssi-0.8.5/src/irc/proxy/dump.c (-1 / +5 lines)
Lines 177-183 Link Here
177
		else
177
		else
178
			g_string_append_c(str, ' ');
178
			g_string_append_c(str, ' ');
179
179
180
		if (nick->op)
180
                if (nick->founder)
181
                        g_string_append_c(str, '*');
182
                else if (nick->admin)
183
                        g_string_append_c(str, '!');
184
                else if (nick->op)
181
                        g_string_append_c(str, '@');
185
                        g_string_append_c(str, '@');
182
		else if (nick->halfop)
186
		else if (nick->halfop)
183
                        g_string_append_c(str, '%');
187
                        g_string_append_c(str, '%');
(-)irssi-0.8.5/src/perl/irc/Channel.xs (-2 / +4 lines)
Lines 50-64 Link Here
50
	}
50
	}
51
51
52
Irssi::Irc::Nick
52
Irssi::Irc::Nick
53
irc_nick_insert(channel, nick, op, halfop, voice, send_massjoin)
53
irc_nick_insert(channel, nick, founder, admin, op, halfop, voice, send_massjoin)
54
	Irssi::Irc::Channel channel
54
	Irssi::Irc::Channel channel
55
	char *nick
55
	char *nick
56
        int founder
57
        int admin
56
	int op
58
	int op
57
	int halfop
59
	int halfop
58
	int voice
60
	int voice
59
	int send_massjoin
61
	int send_massjoin
60
CODE:
62
CODE:
61
	RETVAL = irc_nicklist_insert(channel, nick, op, halfop, voice, send_massjoin);
63
	RETVAL = irc_nicklist_insert(channel, nick, founder, admin, op, halfop, voice, send_massjoin);
62
OUTPUT:
64
OUTPUT:
63
	RETVAL
65
	RETVAL
64
66
(-)irssi-0.8.5/src/perl/irc/Irc.xs (+2 lines)
Lines 119-124 Link Here
119
static void perl_netsplit_channel_fill_hash(HV *hv, NETSPLIT_CHAN_REC *rec)
119
static void perl_netsplit_channel_fill_hash(HV *hv, NETSPLIT_CHAN_REC *rec)
120
{
120
{
121
	hv_store(hv, "name", 4, new_pv(rec->name), 0);
121
	hv_store(hv, "name", 4, new_pv(rec->name), 0);
122
        hv_store(hv, "founder", 7, newSViv(rec->founder), 0);
123
        hv_store(hv, "admin", 5, newSViv(rec->admin), 0);
122
	hv_store(hv, "op", 2, newSViv(rec->op), 0);
124
	hv_store(hv, "op", 2, newSViv(rec->op), 0);
123
	hv_store(hv, "halfop", 6, newSViv(rec->halfop), 0);
125
	hv_store(hv, "halfop", 6, newSViv(rec->halfop), 0);
124
	hv_store(hv, "voice", 5, newSViv(rec->voice), 0);
126
	hv_store(hv, "voice", 5, newSViv(rec->voice), 0);
(-)irssi-0.8.5/src/perl/perl-common.c (+2 lines)
Lines 395-400 Link Here
395
	hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
395
	hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
396
	hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
396
	hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
397
397
398
        hv_store(hv, "founder", 7, newSViv(nick->founder), 0);
399
        hv_store(hv, "admin", 5, newSViv(nick->admin), 0);
398
	hv_store(hv, "op", 2, newSViv(nick->op), 0);
400
	hv_store(hv, "op", 2, newSViv(nick->op), 0);
399
	hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
401
	hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
400
	hv_store(hv, "voice", 5, newSViv(nick->voice), 0);
402
	hv_store(hv, "voice", 5, newSViv(nick->voice), 0);

Return to bug 5385