- Timestamp:
- Aug 8, 2013, 2:38:50 PM (11 years ago)
- Branches:
- master, release-1.10
- Children:
- 120dac7
- Parents:
- 4f7b1f4
- git-author:
- Jason Gross <jgross@mit.edu> (05/27/11 17:39:59)
- git-committer:
- Edward Z. Yang <ezyang@mit.edu> (08/08/13 14:38:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Hooks.pm
rb8a3e00 ra38becd 57 57 from every function registered with this hook will be appended and 58 58 displayed in a popup window, with zephyr formatting parsed. 59 60 =item $awayOn 61 62 Called, for all protocol handlers, to go away, with the away message, 63 if any. 64 65 =item $awayOff 66 67 Called, for all protocol handlers, to come back from away. 68 69 =item $getIsAway 70 71 Called to check away status for all protocol handlers. Protocol 72 handlers should return a true value if any account of the user is away 73 for the given protocol, and a false value otherwise. 59 74 60 75 =item $getQuickstart … … 75 90 $receiveMessage $newMessage 76 91 $mainLoop $getBuddyList 92 $awayOn $awayOff $getIsAway 77 93 $getQuickstart); 78 94 … … 88 104 our $getBuddyList = BarnOwl::Hook->new; 89 105 our $getQuickstart = BarnOwl::Hook->new; 106 our $awayOn = BarnOwl::Hook->new; 107 our $awayOff = BarnOwl::Hook->new; 108 our $getIsAway = BarnOwl::Hook->new; 90 109 91 110 # Internal startup/shutdown routines called by the C code … … 201 220 } 202 221 222 sub _away_on { 223 $awayOn->run(@_); 224 } 225 226 sub _away_off { 227 $awayOff->run(); 228 } 229 230 sub _get_is_away { 231 my @is_away = grep { $_ } $getIsAway->run(); 232 return scalar @is_away; 233 } 234 203 235 sub _new_command { 204 236 my $command = shift;
Note: See TracChangeset
for help on using the changeset viewer.