Changeset 403198c
- Timestamp:
- Jun 1, 2008, 8:37:02 PM (17 years ago)
- Branches:
- barnowl_perlaim
- Children:
- 7d63a6c
- Parents:
- 5fcf137
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
rc453ada r403198c 2470 2470 void owl_command_editresponse_done(owl_editwin *e) 2471 2471 { 2472 owl_function_run_buffercommand();2473 2474 2472 owl_global_set_typwin_inactive(&g); 2475 2473 owl_editwin_fullclear(e); 2476 2474 wnoutrefresh(owl_editwin_get_curswin(e)); 2477 2475 owl_global_set_needrefresh(&g); 2476 2477 owl_function_run_buffercommand(); 2478 2478 } 2479 2479 -
perl/modules/AIM/lib/BarnOwl/Module/AIM.pm
r5fcf137 r403198c 16 16 use Net::OSCAR; 17 17 18 sub cmd_aimlogin { 19 my ($cmd, $user, $pass) = @_; 20 if (undef $user) { 21 BarnOwl::start_question('Username: ', sub { 22 cmd_aimlogin($cmd, @_); 23 }); 24 } elsif (undef $pass) { 25 BarnOwl::start_password('Password: ', sub { 26 cmd_aimlogin($cmd, $user, @_); 27 }); 28 } else { 29 my $oscar = Net::OSCAR->new(); 30 $oscar->set_callback_im_in(\&on_im_in); 31 $oscar->signon($user, $pass); 32 } 33 } 18 our @oscars; 34 19 35 20 sub on_im_in { … … 44 29 } 45 30 31 sub cmd_aimlogin { 32 =comment 33 my ($cmd, $user, $pass) = @_; 34 if (!defined $user) { 35 BarnOwl::start_question('Username: ', sub { 36 cmd_aimlogin($cmd, @_); 37 }); 38 } elsif (!defined $pass) { 39 BarnOwl::start_password('Password: ', sub { 40 cmd_aimlogin($cmd, $user, @_); 41 }); 42 } else { 43 =cut 44 { 45 my $oscar = Net::OSCAR->new(); 46 my ($user, $pass) = ('...', '...'); 47 $oscar->set_callback_im_in(\&on_im_in); 48 $oscar->signon( 49 screenname => $user, 50 password => $pass 51 ); 52 push @oscars, $oscar; 53 } 54 } 46 55 BarnOwl::new_command(aimlogin => \&cmd_aimlogin, {}); 47 56 57 sub main_loop { 58 for my $oscar (@oscars) { 59 $oscar->do_one_loop(); 60 } 61 } 62 $BarnOwl::Hooks::mainLoop->add(\&main_loop); 63 48 64 1; 65 66 # vim: set sw=4 et cin:
Note: See TracChangeset
for help on using the changeset viewer.