Changeset f1589b5
- Timestamp:
- Jun 4, 2007, 10:30:39 PM (18 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 48609ce
- Parents:
- f1fc47f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
r4508e21 rf1589b5 37 37 die("Not loading Jabber.par\n"); 38 38 } 39 } 39 } 40 40 } 41 41 … … 68 68 $BarnOwl::Hooks::getBuddyList->add(\&onGetBuddyList); 69 69 $vars{show} = ''; 70 BarnOwl::new_variable_bool("jabber:show_offline_buddies", 71 { default => 1, 72 summary => 'Show offline or pending buddies.'}); 73 BarnOwl::new_variable_int("jabber:auto_away_timeout", 74 { default => 5, 75 summary => 'After minutes idle, auto away.', 76 }); 77 BarnOwl::new_variable_int("jabber:auto_xa_timeout", 78 { default => 15, 79 summary => 'After minutes idle, auto extended away.' 80 }); 70 81 } else { 71 82 # Our owl doesn't support queue_message. Unfortunately, this … … 81 92 82 93 $vars{status_changed} = 0; 94 my $auto_away = BarnOwl::getvar('jabber:auto_away_timeout'); 95 my $auto_xa = BarnOwl::getvar('jabber:auto_xa_timeout'); 83 96 my $idletime = BarnOwl::getidletime(); 84 if ($ idletime >= 900 && $vars{show} eq 'away') {97 if ($auto_xa != 0 && $idletime >= (60 * $auto_xa) && ($vars{show} eq 'away' || $vars{show} eq '' )) { 85 98 $vars{show} = 'xa'; 86 $vars{status} = 'Auto extended-away after 15 minutesidle.';99 $vars{status} = 'Auto extended-away after '.$auto_xa.' minute'.($auto_xa == 1 ? '' : 's').' idle.'; 87 100 $vars{status_changed} = 1; 88 } elsif ($ idletime >= 300&& $vars{show} eq '') {101 } elsif ($auto_away != 0 && $idletime >= (60 * $auto_away) && $vars{show} eq '') { 89 102 $vars{show} = 'away'; 90 $vars{status} = 'Auto away after 5 minutesidle.';103 $vars{status} = 'Auto away after '.$auto_away.' minute'.($auto_away == 1 ? '' : 's').' idle.'; 91 104 $vars{status_changed} = 1; 92 105 } elsif ($idletime == 0 && $vars{show} ne '') { … … 140 153 } 141 154 else { 155 return '' unless BarnOwl::getvar('jabber:show_offline_buddies') != 'on'; 142 156 if ($jq{ask}) { 143 157 $blistStr .= " [pending]"; … … 195 209 jabberlogin => \&cmd_login, 196 210 { 197 summary => "Log into jabber", 211 summary => "Log into jabber", 198 212 usage => "jabberlogin JID [PASSWORD]" 199 213 } … … 379 393 delete $vars{jlogin_connhash}; 380 394 delete $vars{jlogin_authhash}; 381 395 382 396 return ""; 383 397 }
Note: See TracChangeset
for help on using the changeset viewer.