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

(-)irssi-0.8.9/default.theme (+1 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_admin = "{names_nick $*}";
225
  names_nick_op = "{names_nick $*}";
226
  names_nick_op = "{names_nick $*}";
226
  names_nick_halfop = "{names_nick $*}";
227
  names_nick_halfop = "{names_nick $*}";
227
  names_nick_voice = "{names_nick $*}";
228
  names_nick_voice = "{names_nick $*}";
(-)irssi-0.8.9/src/core/channels.c (-4 / +5 lines)
Lines 222-231 Link Here
222
	const char *flags = server->get_nick_flags();
222
	const char *flags = server->get_nick_flags();
223
223
224
	return strchr(flags, flag) == NULL ||
224
	return strchr(flags, flag) == NULL ||
225
		(flag == flags[0] && nick->op) ||
225
		(flag == flags[0] && nick->admin) ||
226
		(flag == flags[1] && (nick->voice || nick->halfop ||
226
		(flag == flags[1] && (nick->op || nick->admin)) ||
227
				      nick->op)) ||
227
		(flag == flags[2] && (nick->voice || nick->halfop ||
228
		(flag == flags[2] && (nick->halfop || nick->op));
228
				      nick->op || nick->admin)) ||
229
		(flag == flags[2] && (nick->halfop || nick->op || nick->admin));
229
}
230
}
230
231
231
/* Send the auto send command to channel */
232
/* Send the auto send command to channel */
(-)irssi-0.8.9/src/core/nick-rec.h (+1 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 admin:1;
19
unsigned int op:1;
20
unsigned int op:1;
20
unsigned int halfop:1;
21
unsigned int halfop:1;
21
unsigned int voice:1;
22
unsigned int voice:1;
(-)irssi-0.8.9/src/core/nicklist.c (-3 / +7 lines)
Lines 364-375 Link Here
364
	if (p1 == NULL) return -1;
364
	if (p1 == NULL) return -1;
365
	if (p2 == NULL) return 1;
365
	if (p2 == NULL) return 1;
366
366
367
	/* we assign each status (op, halfop, voice, normal) a number
367
	/* we assign each status (admin, op, halfop, voice, normal) a number
368
	 * and compare them. this is easier than 100,000 if's and
368
	 * and compare them. this is easier than 100,000 if's and
369
	 * returns :-)
369
	 * returns :-)
370
	 * -- yath */
370
	 * -- yath */
371
371
372
	if (p1->op)
372
	if (p1->admin)
373
		status1 = 5;
374
	else if (p1->op)
373
		status1 = 4;
375
		status1 = 4;
374
	else if (p1->halfop)
376
	else if (p1->halfop)
375
		status1 = 3;
377
		status1 = 3;
Lines 378-384 Link Here
378
	else
380
	else
379
		status1 = 1;
381
		status1 = 1;
380
382
381
	if (p2->op)
383
	if (p2->admin)
384
		status2 = 5;
385
	else if (p2->op)
382
		status2 = 4;
386
		status2 = 4;
383
	else if (p2->halfop)
387
	else if (p2->halfop)
384
		status2 = 3;
388
		status2 = 3;
(-)irssi-0.8.9/src/core/server-rec.h (-2 / +2 lines)
Lines 52-62 Link Here
52
   with commas. there can exist other information after first space like
52
   with commas. there can exist other information after first space like
53
   channel keys etc. */
53
   channel keys etc. */
54
void (*channels_join)(SERVER_REC *server, const char *data, int automatic);
54
void (*channels_join)(SERVER_REC *server, const char *data, int automatic);
55
/* returns true if `flag' indicates a nick flag (op/voice/halfop) */
55
/* returns true if `flag' indicates a nick flag (admin/op/voice/halfop) */
56
int (*isnickflag)(char flag);
56
int (*isnickflag)(char flag);
57
/* returns true if `data' indicates a channel */
57
/* returns true if `data' indicates a channel */
58
int (*ischannel)(SERVER_REC *server, const char *data);
58
int (*ischannel)(SERVER_REC *server, const char *data);
59
/* returns all nick flag characters in order op, voice, halfop. If some
59
/* returns all nick flag characters in order admin, op, voice, halfop. If some
60
   of them aren't supported '\0' can be used. */
60
   of them aren't supported '\0' can be used. */
61
const char *(*get_nick_flags)(void);
61
const char *(*get_nick_flags)(void);
62
/* send public or private message to server */
62
/* send public or private message to server */
(-)irssi-0.8.9/src/fe-common/core/fe-channels.c (-9 / +18 lines)
Lines 399-405 Link Here
399
	for (tmp = nicklist; tmp != NULL; tmp = tmp->next) {
399
	for (tmp = nicklist; tmp != NULL; tmp = tmp->next) {
400
		NICK_REC *rec = tmp->data;
400
		NICK_REC *rec = tmp->data;
401
401
402
		if (rec->op)
402
		if (rec->admin)
403
			nickmode[0] = '!';
404
		else if (rec->op)
403
			nickmode[0] = '@';
405
			nickmode[0] = '@';
404
		else if (rec->halfop)
406
		else if (rec->halfop)
405
			nickmode[0] = '%';
407
			nickmode[0] = '%';
Lines 416-422 Link Here
416
		linebuf[columns[col]-item_extra] = '\0';
418
		linebuf[columns[col]-item_extra] = '\0';
417
		memcpy(linebuf, rec->nick, strlen(rec->nick));
419
		memcpy(linebuf, rec->nick, strlen(rec->nick));
418
420
419
		formatnum = rec->op ? TXT_NAMES_NICK_OP :
421
		formatnum = rec->admin ? TXT_NAMES_NICK_ADMIN :
422
			rec->op ? TXT_NAMES_NICK_OP :
420
			rec->halfop ? TXT_NAMES_NICK_HALFOP :
423
			rec->halfop ? TXT_NAMES_NICK_HALFOP :
421
			rec->voice ? TXT_NAMES_NICK_VOICE :
424
			rec->voice ? TXT_NAMES_NICK_VOICE :
422
                        TXT_NAMES_NICK;
425
                        TXT_NAMES_NICK;
Lines 456-464 Link Here
456
{
459
{
457
	NICK_REC *nick;
460
	NICK_REC *nick;
458
	GSList *tmp, *nicklist, *sorted;
461
	GSList *tmp, *nicklist, *sorted;
459
	int nicks, normal, voices, halfops, ops;
462
	int nicks, normal, voices, halfops, ops, admins;
460
463
461
	nicks = normal = voices = halfops = ops = 0;
464
	admins = nicks = normal = voices = halfops = ops = 0;
462
	nicklist = nicklist_getnicks(channel);
465
	nicklist = nicklist_getnicks(channel);
463
	sorted = NULL;
466
	sorted = NULL;
464
467
Lines 467-473 Link Here
467
		nick = tmp->data;
470
		nick = tmp->data;
468
471
469
		nicks++;
472
		nicks++;
470
		if (nick->op) {
473
		if (nick->admin) {
474
			admins++;
475
			if ((flags & CHANNEL_NICKLIST_FLAG_ADMINS) == 0)
476
				continue;
477
		} else if (nick->op) {
471
			ops++;
478
			ops++;
472
			if ((flags & CHANNEL_NICKLIST_FLAG_OPS) == 0)
479
			if ((flags & CHANNEL_NICKLIST_FLAG_OPS) == 0)
473
                                continue;
480
                                continue;
Lines 495-511 Link Here
495
		printformat(channel->server, channel->visible_name,
502
		printformat(channel->server, channel->visible_name,
496
			    MSGLEVEL_CLIENTCRAP, TXT_NAMES,
503
			    MSGLEVEL_CLIENTCRAP, TXT_NAMES,
497
			    channel->visible_name,
504
			    channel->visible_name,
498
			    nicks, ops, halfops, voices, normal);
505
			    nicks, admins, ops, halfops, voices, normal);
499
		display_sorted_nicks(channel, sorted);
506
		display_sorted_nicks(channel, sorted);
500
	}
507
	}
501
	g_slist_free(sorted);
508
	g_slist_free(sorted);
502
509
503
	printformat(channel->server, channel->visible_name,
510
	printformat(channel->server, channel->visible_name,
504
		    MSGLEVEL_CLIENTNOTICE, TXT_ENDOFNAMES,
511
		    MSGLEVEL_CLIENTNOTICE, TXT_ENDOFNAMES,
505
		    channel->visible_name, nicks, ops, halfops, voices, normal);
512
		    channel->visible_name, nicks, admins, ops, halfops, voices, normal);
506
}
513
}
507
514
508
/* SYNTAX: NAMES [-count | -ops -halfops -voices -normal] [<channels> | **] */
515
/* SYNTAX: NAMES [-count | -admins -ops -halfops -voices -normal] [<channels> | **] */
509
static void cmd_names(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
516
static void cmd_names(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
510
{
517
{
511
	CHANNEL_REC *chanrec;
518
	CHANNEL_REC *chanrec;
Lines 531-536 Link Here
531
	}
538
	}
532
539
533
	flags = 0;
540
	flags = 0;
541
        if (g_hash_table_lookup(optlist, "admin") != NULL)
542
	         flags |= CHANNEL_NICKLIST_FLAG_ADMINS;
534
	if (g_hash_table_lookup(optlist, "ops") != NULL)
543
	if (g_hash_table_lookup(optlist, "ops") != NULL)
535
		flags |= CHANNEL_NICKLIST_FLAG_OPS;
544
		flags |= CHANNEL_NICKLIST_FLAG_OPS;
536
	if (g_hash_table_lookup(optlist, "halfops") != NULL)
545
	if (g_hash_table_lookup(optlist, "halfops") != NULL)
Lines 629-635 Link Here
629
	command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);
638
	command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);
630
639
631
	command_set_options("channel add", "auto noauto -bots -botcmd");
640
	command_set_options("channel add", "auto noauto -bots -botcmd");
632
	command_set_options("names", "count ops halfops voices normal");
641
	command_set_options("names", "count admins ops halfops voices normal");
633
	command_set_options("join", "window");
642
	command_set_options("join", "window");
634
}
643
}
635
644
(-)irssi-0.8.9/src/fe-common/core/fe-channels.h (+1 lines)
Lines 1-6 Link Here
1
#ifndef __FE_CHANNELS_H
1
#ifndef __FE_CHANNELS_H
2
#define __FE_CHANNELS_H
2
#define __FE_CHANNELS_H
3
3
4
#define CHANNEL_NICKLIST_FLAG_ADMINS       0x03
4
#define CHANNEL_NICKLIST_FLAG_OPS       0x01
5
#define CHANNEL_NICKLIST_FLAG_OPS       0x01
5
#define CHANNEL_NICKLIST_FLAG_HALFOPS   0x02
6
#define CHANNEL_NICKLIST_FLAG_HALFOPS   0x02
6
#define CHANNEL_NICKLIST_FLAG_VOICES    0x04
7
#define CHANNEL_NICKLIST_FLAG_VOICES    0x04
(-)irssi-0.8.9/src/fe-common/core/fe-messages.c (+1 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->admin ? "!" :
126
		nickrec->op ? "@" :
127
		nickrec->op ? "@" :
127
		nickrec->halfop ? "%" :
128
		nickrec->halfop ? "%" :
128
		nickrec->voice ? "+" :
129
		nickrec->voice ? "+" :
(-)irssi-0.8.9/src/fe-common/core/module-formats.c (-2 / +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_op", "{names_nick_op $0 $1}", 2, { 0, 0 } },
112
        { "names_nick_admin", "{names_nick_admin $0 $1}", 2, { 0, 0 } },
113
	{ "names_nick_op", "{names_nick_op $0 $1}", 2, { 0, 0 } },
113
        { "names_nick_halfop", "{names_nick_halfop $0 $1}", 2, { 0, 0 } },
114
        { "names_nick_halfop", "{names_nick_halfop $0 $1}", 2, { 0, 0 } },
114
        { "names_nick_voice", "{names_nick_voice $0 $1}", 2, { 0, 0 } },
115
        { "names_nick_voice", "{names_nick_voice $0 $1}", 2, { 0, 0 } },
115
        { "names_nick", "{names_nick $0 $1}", 2, { 0, 0 } },
116
        { "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 } },
117
        { "endofnames", "{channel $0}: Total of {hilight $1} nicks {comment {hilight $2} admins, {hilight $3} ops, {hilight $4} halfops, {hilight $5} voices, {hilight $6} normal}", 7, { 0, 1, 1, 1, 1, 1, 1 } },
117
	{ "chanlist_header", "%#You are on the following channels:", 0 },
118
	{ "chanlist_header", "%#You are on the following channels:", 0 },
118
	{ "chanlist_line", "%#{channel $[-10]0} %|+$1 ($2): $3", 4, { 0, 0, 0, 0 } },
119
	{ "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 } },
120
	{ "chansetup_not_found", "Channel {channel $0} not found", 2, { 0, 0 } },
(-)irssi-0.8.9/src/fe-common/core/module-formats.h (+1 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_ADMIN,
88
	TXT_NAMES_NICK_OP,
89
	TXT_NAMES_NICK_OP,
89
	TXT_NAMES_NICK_HALFOP,
90
	TXT_NAMES_NICK_HALFOP,
90
	TXT_NAMES_NICK_VOICE,
91
	TXT_NAMES_NICK_VOICE,
(-)irssi-0.8.9/src/fe-common/irc/fe-netjoin.c (-2 / +2 lines)
Lines 348-356 Link Here
348
}
348
}
349
349
350
#define isnickmode(c) \
350
#define isnickmode(c) \
351
	((c) == 'o' || (c) == 'v' || (c) == 'h')
351
	((c) == 'a' || (c) == 'o' || (c) == 'v' || (c) == 'h')
352
#define nickmodechar(c) \
352
#define nickmodechar(c) \
353
	((c) == 'o' ? '@' : ((c) == 'v' ? '+' : ((c) == 'h' ? '%' : '\0')))
353
	((c) == 'a' ? '!' : ((c) == 'o' ? '@' : ((c) == 'v' ? '+' : ((c) == 'h' ? '%' : '\0'))))
354
354
355
static void msg_mode(IRC_SERVER_REC *server, const char *channel,
355
static void msg_mode(IRC_SERVER_REC *server, const char *channel,
356
		     const char *sender, const char *addr, const char *data)
356
		     const char *sender, const char *addr, const char *data)
(-)irssi-0.8.9/src/irc/core/irc-expandos.c (-5 / +6 lines)
Lines 82-100 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, admin '!', 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_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) {
88
	if (IS_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) {
89
		return NICK(CHANNEL(item)->ownnick)->op ? "@" :
89
		return  NICK(CHANNEL(item)->ownnick)->admin ? "!" :
90
		       NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
90
			NICK(CHANNEL(item)->ownnick)->op ? "@" :
91
		       NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
91
			NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
92
			NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
92
	}
93
	}
93
	return "";
94
	return "";
94
}
95
}
95
96
96
/* expands to your usermode on channel,
97
/* expands to your usermode on channel,
97
   op '@', halfop '%', "+" voice, " " normal */
98
   admin '!', op '@', halfop '%', "+" voice, " " normal */
98
static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret)
99
static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret)
99
{
100
{
100
	char *ret;
101
	char *ret;
(-)irssi-0.8.9/src/irc/core/irc-nicklist.c (-6 / +10 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 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 (admin) rec->admin = TRUE;
44
	if (op) rec->op = TRUE;
45
	if (op) rec->op = TRUE;
45
	if (halfop) rec->halfop = TRUE;
46
	if (halfop) rec->halfop = TRUE;
46
	if (voice) rec->voice = TRUE;
47
	if (voice) rec->voice = TRUE;
Lines 78-84 Link Here
78
{
79
{
79
	IRC_CHANNEL_REC *chanrec;
80
	IRC_CHANNEL_REC *chanrec;
80
	char *params, *type, *channel, *names, *ptr;
81
	char *params, *type, *channel, *names, *ptr;
81
        int op, halfop, voice;
82
        int admin, op, halfop, voice;
82
83
83
	g_return_if_fail(data != NULL);
84
	g_return_if_fail(data != NULL);
84
85
Lines 117-125 Link Here
117
		   showing "@+nick" and since none of these chars are valid
118
		   showing "@+nick" and since none of these chars are valid
118
		   nick chars, just check them until a non-nickflag char is
119
		   nick chars, just check them until a non-nickflag char is
119
		   found. FIXME: we just ignore owner char now. */
120
		   found. FIXME: we just ignore owner char now. */
120
		op = halfop = voice = FALSE;
121
		admin = op = halfop = voice = FALSE;
121
		while (isnickflag(*ptr)) {
122
		while (isnickflag(*ptr)) {
122
			switch (*ptr) {
123
			switch (*ptr) {
124
			case '!':
125
				admin = TRUE;
126
				break;
123
			case '@':
127
			case '@':
124
                                op = TRUE;
128
                                op = TRUE;
125
                                break;
129
                                break;
Lines 134-140 Link Here
134
		}
138
		}
135
139
136
		if (nicklist_find((CHANNEL_REC *) chanrec, ptr) == NULL) {
140
		if (nicklist_find((CHANNEL_REC *) chanrec, ptr) == NULL) {
137
			irc_nicklist_insert(chanrec, ptr, op, halfop,
141
			irc_nicklist_insert(chanrec, ptr, admin, op, halfop,
138
					    voice, FALSE);
142
					    voice, FALSE);
139
		}
143
		}
140
	}
144
	}
Lines 161-167 Link Here
161
			   if channel is empty */
165
			   if channel is empty */
162
			nicks = g_hash_table_size(chanrec->nicks);
166
			nicks = g_hash_table_size(chanrec->nicks);
163
			ownnick = irc_nicklist_insert(chanrec, server->nick,
167
			ownnick = irc_nicklist_insert(chanrec, server->nick,
164
						      nicks == 0, FALSE,
168
						      nicks == 0, FALSE, FALSE,
165
						      FALSE, FALSE);
169
						      FALSE, FALSE);
166
		}
170
		}
167
		nicklist_set_own(CHANNEL(chanrec), ownnick);
171
		nicklist_set_own(CHANNEL(chanrec), ownnick);
Lines 378-384 Link Here
378
382
379
static const char *get_nick_flags(void)
383
static const char *get_nick_flags(void)
380
{
384
{
381
        return "@+%";
385
        return "!@+%";
382
}
386
}
383
387
384
static void sig_connected(IRC_SERVER_REC *server)
388
static void sig_connected(IRC_SERVER_REC *server)
(-)irssi-0.8.9/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 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.9/src/irc/core/irc-session.c (-2 / +3 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 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
	admin = config_node_get_bool(node, "admin", FALSE);
88
	op = config_node_get_bool(node, "op", FALSE);
89
	op = config_node_get_bool(node, "op", FALSE);
89
        voice = config_node_get_bool(node, "voice", FALSE);
90
        voice = config_node_get_bool(node, "voice", FALSE);
90
        halfop = config_node_get_bool(node, "halfop", FALSE);
91
        halfop = config_node_get_bool(node, "halfop", FALSE);
91
	nickrec = irc_nicklist_insert(channel, nick, op, halfop, voice, FALSE);
92
	nickrec = irc_nicklist_insert(channel, nick, admin, op, halfop, voice, FALSE);
92
}
93
}
93
94
94
static void session_restore_channel(IRC_CHANNEL_REC *channel)
95
static void session_restore_channel(IRC_CHANNEL_REC *channel)
(-)irssi-0.8.9/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, 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.9/src/irc/core/modes.c (-1 / +4 lines)
Lines 43-48 Link Here
43
	nickrec = nicklist_find(CHANNEL(channel), nick);
43
	nickrec = nicklist_find(CHANNEL(channel), nick);
44
	if (nickrec == NULL) return; /* No /names list got yet */
44
	if (nickrec == NULL) return; /* No /names list got yet */
45
45
46
	if (mode == '!') nickrec->admin = type == '+';
46
	if (mode == '@') nickrec->op = type == '+';
47
	if (mode == '@') nickrec->op = type == '+';
47
	if (mode == '+') nickrec->voice = type == '+';
48
	if (mode == '+') nickrec->voice = type == '+';
48
	if (mode == '%') nickrec->halfop = type == '+';
49
	if (mode == '%') nickrec->halfop = type == '+';
Lines 248-254 Link Here
248
		case 'v':
249
		case 'v':
249
			nick_mode_change(channel, arg, '+', type, setby);
250
			nick_mode_change(channel, arg, '+', type, setby);
250
			break;
251
			break;
251
252
		case 'a':
253
			nick_mode_change(channel, arg, '!', type, setby);
254
			break;
252
		case 'l':
255
		case 'l':
253
			mode_set_arg(newmode, type, 'l', arg);
256
			mode_set_arg(newmode, type, 'l', arg);
254
			channel->limit = type == '-' ? 0 : atoi(arg);
257
			channel->limit = type == '-' ? 0 : atoi(arg);
(-)irssi-0.8.9/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' || (mode) == 'f')
8
        (mode) == 'O' || (mode) == 'k' || (mode) == 'f' || (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.9/src/irc/core/netsplit.c (+1 lines)
Lines 132-137 Link Here
132
132
133
		splitchan = g_new0(NETSPLIT_CHAN_REC, 1);
133
		splitchan = g_new0(NETSPLIT_CHAN_REC, 1);
134
		splitchan->name = g_strdup(channel->visible_name);
134
		splitchan->name = g_strdup(channel->visible_name);
135
		splitchan->admin = nickrec->admin;
135
		splitchan->op = nickrec->op;
136
		splitchan->op = nickrec->op;
136
		splitchan->halfop = nickrec->halfop;
137
		splitchan->halfop = nickrec->halfop;
137
		splitchan->voice = nickrec->voice;
138
		splitchan->voice = nickrec->voice;
(-)irssi-0.8.9/src/irc/core/netsplit.h (+1 lines)
Lines 25-30 Link Here
25
25
26
typedef struct {
26
typedef struct {
27
	char *name;
27
	char *name;
28
	unsigned int admin:1;
28
	unsigned int op:1;
29
	unsigned int op:1;
29
	unsigned int halfop:1;
30
	unsigned int halfop:1;
30
	unsigned int voice:1;
31
	unsigned int voice:1;
(-)irssi-0.8.9/src/irc/proxy/dump.c (-1 / +3 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->admin)
181
			g_string_append_c(str, '!');
182
		else if (nick->op)
181
                        g_string_append_c(str, '@');
183
                        g_string_append_c(str, '@');
182
		else if (nick->halfop)
184
		else if (nick->halfop)
183
                        g_string_append_c(str, '%');
185
                        g_string_append_c(str, '%');
(-)irssi-0.8.9/src/perl/irc/Channel.xs (-2 / +3 lines)
Lines 50-63 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, admin, op, halfop, voice, send_massjoin)
54
	Irssi::Irc::Channel channel
54
	Irssi::Irc::Channel channel
55
	char *nick
55
	char *nick
56
	int admin
56
	int op
57
	int op
57
	int halfop
58
	int halfop
58
	int voice
59
	int voice
59
	int send_massjoin
60
	int send_massjoin
60
CODE:
61
CODE:
61
	RETVAL = irc_nicklist_insert(channel, nick, op, halfop, voice, send_massjoin);
62
	RETVAL = irc_nicklist_insert(channel, nick, admin, op, halfop, voice, send_massjoin);
62
OUTPUT:
63
OUTPUT:
63
	RETVAL
64
	RETVAL
(-)irssi-0.8.9/src/perl/irc/Irc.xs (+1 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, "admin", 2, newSViv(rec->admin), 0);
122
	hv_store(hv, "op", 2, newSViv(rec->op), 0);
123
	hv_store(hv, "op", 2, newSViv(rec->op), 0);
123
	hv_store(hv, "halfop", 6, newSViv(rec->halfop), 0);
124
	hv_store(hv, "halfop", 6, newSViv(rec->halfop), 0);
124
	hv_store(hv, "voice", 5, newSViv(rec->voice), 0);
125
	hv_store(hv, "voice", 5, newSViv(rec->voice), 0);
(-)irssi-0.8.9/src/perl/perl-common.c (+1 lines)
Lines 433-438 Link Here
433
	hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
433
	hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
434
	hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
434
	hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
435
435
436
	hv_store(hv, "admin", 2, newSViv(nick->admin), 0);
436
	hv_store(hv, "op", 2, newSViv(nick->op), 0);
437
	hv_store(hv, "op", 2, newSViv(nick->op), 0);
437
	hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
438
	hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
438
	hv_store(hv, "voice", 5, newSViv(nick->voice), 0);
439
	hv_store(hv, "voice", 5, newSViv(nick->voice), 0);

Return to bug 46444