~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to src/fe-common/core/fe-channels.c

  • Committer: Bazaar Package Importer
  • Author(s): Christian Bjälevik
  • Date: 2007-04-28 02:52:01 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070428025201-2c4swxnpn4wr7fpg
Tags: 0.8.11-0ubuntu1
* New upstream release:
  - http://www.irssi.org/news/ChangeLog
* debian/{control,compat}:
  - Bump Standards.
* debian/patches/00list:
  - Disable 05upgrade-check-binary.patch, applied upstream.
  - Disable 08doublefree.patch, applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
        NICK_REC *nick;
474
474
        GSList *tmp, *nicklist, *sorted;
475
475
        int nicks, normal, voices, halfops, ops;
 
476
        const char *nick_flags;
476
477
 
477
478
        nicks = normal = voices = halfops = ops = 0;
478
479
        nicklist = nicklist_getnicks(channel);
479
480
        sorted = NULL;
 
481
        nick_flags = channel->server->get_nick_flags(channel->server);
480
482
 
481
 
        /* sort the nicklist */
 
483
        /* filter (for flags) and count ops, halfops, voices */
482
484
        for (tmp = nicklist; tmp != NULL; tmp = tmp->next) {
483
485
                nick = tmp->data;
484
486
 
501
503
                                continue;
502
504
                }
503
505
 
504
 
                sorted = g_slist_insert_sorted(sorted, nick, (GCompareFunc)
505
 
                                               nicklist_compare);
 
506
                sorted = g_slist_prepend(sorted, nick);
506
507
        }
507
508
        g_slist_free(nicklist);
508
509
 
 
510
        /* sort the nicklist */
 
511
#if GLIB_MAJOR_VERSION < 2
 
512
        /* glib1 doesn't have g_slist_sort_with_data, so non-standard prefixes won't be sorted correctly */
 
513
        sorted = g_slist_sort(sorted, (GCompareFunc)nicklist_compare_glib1);
 
514
#else
 
515
        sorted = g_slist_sort_with_data(sorted, (GCompareDataFunc) nicklist_compare, (void *)nick_flags);
 
516
#endif
 
517
 
509
518
        /* display the nicks */
510
519
        if ((flags & CHANNEL_NICKLIST_FLAG_COUNT) == 0) {
511
520
                printformat(channel->server, channel->visible_name,