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] = '%'; |
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; |
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 |
|
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; |
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> | **] */ |
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) |
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 |
|