Changeset 4211f50b for commands.c


Ignore:
Timestamp:
Oct 24, 2006, 11:45:16 AM (14 years ago)
Author:
Nelson Elhage <nelhage@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:
216c734
Parents:
908e388
Message:
Refactoring the editwin code to use an explicit callback.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rc0a90c2 r4211f50b  
    23672367char *owl_command_aimlogin(int argc, char **argv, char *buff)
    23682368{
    2369   int ret;
    2370  
    23712369  if ((argc<2) || (argc>3)) {
    23722370    owl_function_makemsg("Wrong number of arguments to aimlogin command");
     
    23762374  /* if we get two arguments, ask for the password */
    23772375  if (argc==2) {
    2378     owl_global_set_buffercommand(&g, buff);
     2376    owl_global_set_buffercommand(&g, argv[1]);
     2377    owl_global_set_buffercallback(&g, owl_function_aimlogin);
    23792378    owl_function_start_password("AIM Password: ");
    23802379    return(NULL);
    2381   }
    2382 
    2383   /* clear the buddylist */
    2384   owl_buddylist_clear(owl_global_get_buddylist(&g));
    2385 
    2386   /* try to login */
    2387   ret=owl_aim_login(argv[1], argv[2]);
    2388   if (ret) owl_function_makemsg("Warning: login for %s failed.\n", argv[1]);
     2380  } else {
     2381    owl_function_aimlogin(argv[1], argv[2]);
     2382  }
    23892383
    23902384  /* this is a test */
Note: See TracChangeset for help on using the changeset viewer.