Changeset 879e7e94 for perl


Ignore:
Timestamp:
Jan 30, 2008, 3:49:35 PM (13 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1b737a1
Parents:
cab045b
Message:
Jabber Buddy Lists:
* Query the jabber:show_offline_buddies once when invoking onGetBuddyList()
* Don't bold online roster entries when hiding offline ones
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm

    r05f0061 r879e7e94  
    135135}
    136136
     137our $showOffline = 0;
     138
    137139sub blist_listBuddy {
    138140    my $roster = shift;
     
    150152        $blistStr .= " [" . ( $rq{show} ? $rq{show} : 'online' ) . "]";
    151153        $blistStr .= " " . $rq{status} if $rq{status};
    152         $blistStr = BarnOwl::Style::boldify($blistStr);
     154        $blistStr = BarnOwl::Style::boldify($blistStr) if $showOffline;
    153155    }
    154156    else {
    155         return '' if (BarnOwl::getvar('jabber:show_offline_buddies') eq 'off');
     157        return '' unless $showOffline;
    156158        if ($jq{ask}) {
    157159            $blistStr .= " [pending]";
     
    196198
    197199sub onGetBuddyList {
     200    $showOffline = BarnOwl::getvar('jabber:show_offline_buddies') eq 'on';
    198201    my $blist = "";
    199202    foreach my $jid ($conn->getJIDs()) {
Note: See TracChangeset for help on using the changeset viewer.