Changeset 952bb256 for commands.c


Ignore:
Timestamp:
Dec 22, 2003, 11:25:16 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9854278
Parents:
2de4f20
Message:
Added the 'aim search' command.  The popup on callback may be
  dangerous, should switch to an admin msg for results, or add a
  new event queue
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r2674412 r952bb256  
    237237              "source <filename>",
    238238              "Execute the owl commands in <filename>.\n"),
     239
     240  OWLCMD_ARGS("aim", owl_command_aim, OWL_CTX_INTERACTIVE,
     241              "AIM specific commands",
     242              "aim search <email>",
     243              ""),
    239244
    240245  OWLCMD_ARGS("addbuddy", owl_command_addbuddy, OWL_CTX_INTERACTIVE,
     
    961966  sprintf(buff, "Owl version %s", OWL_VERSION_STRING);
    962967  owl_function_makemsg(buff);
     968}
     969
     970char *owl_command_aim(int argc, char **argv, char *buff)
     971{
     972  if (argc<2) {
     973    owl_function_makemsg("not enough arguments to aim command");
     974    return(NULL);
     975  }
     976
     977  if (!strcmp(argv[1], "search")) {
     978    if (argc!=3) {
     979      owl_function_makemsg("not enough arguments to aim search command");
     980      return(NULL);
     981    }
     982    owl_aim_search(argv[2]);
     983  } else {
     984    owl_function_makemsg("unknown subcommand '%s' for aim command");
     985    return(NULL);
     986  }
     987  return(NULL);
    963988}
    964989
Note: See TracChangeset for help on using the changeset viewer.