Changeset 2527615
- Timestamp:
- Oct 12, 2002, 11:14:41 AM (22 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- b12c219
- Parents:
- d023c25
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
rd023c25 r2527615 4 4 Outgoing messages now go through the config for formatting 5 5 Zaway now makes an outgoing message, instead of an admin message 6 The 'zlocate' command can now handle multiple users 6 7 7 8 1.2.6 -
commands.c
r2adaf1d r2527615 366 366 OWLCMD_ARGS("zlocate", owl_command_zlocate, OWL_CTX_INTERACTIVE, 367 367 "locate a user", 368 "zlocate [-d] <user> ",369 "Performs a zlocate on a user and puts the result into\n"370 " a popwin. If -d is specified, does not authenticate\n"368 "zlocate [-d] <user> ...", 369 "Performs a zlocate on one ore more users and puts the result\n" 370 "int a popwin. If -d is specified, does not authenticate\n" 371 371 "the lookup request.\n"), 372 372 … … 1335 1335 1336 1336 char *owl_command_zlocate(int argc, char **argv, char *buff) { 1337 if (argc==2) { 1338 owl_function_zlocate(argv[1], 1); 1339 } else if (argc==3) { 1340 if (!strcmp(argv[1], "-d")) { 1341 owl_function_zlocate(argv[2], 0); 1337 int auth; 1338 1339 if (argc<2) { 1340 owl_function_makemsg("Too few arguments for zlocate command"); 1341 return NULL; 1342 } 1343 1344 auth=1; 1345 if (!strcmp(argv[1], "-d")) { 1346 if (argc>2) { 1347 auth=0; 1348 argc--; 1349 argv++; 1342 1350 } else { 1343 owl_function_makemsg(" Invalid option to thezlocate command");1351 owl_function_makemsg("Missing arguments for zlocate command"); 1344 1352 return NULL; 1345 1353 } 1346 } else { 1347 owl_function_makemsg("Wrong number of arguments for zlocate command"); 1348 return NULL; 1349 } 1354 } 1355 1356 argc--; 1357 argv++; 1358 owl_function_zlocate(argc, argv, auth); 1350 1359 return NULL; 1351 1360 } -
functions.c
rb45293f r2527615 1588 1588 } 1589 1589 1590 void owl_function_zlocate(char *user, int auth) { 1591 char buff[LINE], myuser[LINE]; 1592 char *ptr; 1593 1594 strcpy(myuser, user); 1595 ptr=strchr(myuser, '@'); 1596 if (!ptr) { 1597 strcat(myuser, "@"); 1598 strcat(myuser, ZGetRealm()); 1599 } 1600 1601 owl_zephyr_zlocate(myuser, buff, auth); 1602 owl_function_popless_text(buff); 1590 void owl_function_zlocate(int argc, char **argv, int auth) { 1591 owl_fmtext fm; 1592 char *ptr, buff[LINE]; 1593 int i; 1594 1595 owl_fmtext_init_null(&fm); 1596 1597 for (i=0; i<argc; i++) { 1598 ptr=long_zuser(argv[i]); 1599 owl_zephyr_zlocate(ptr, buff, auth); 1600 owl_fmtext_append_normal(&fm, buff); 1601 owl_free(ptr); 1602 } 1603 1604 owl_function_popless_fmtext(&fm); 1605 owl_fmtext_free(&fm); 1603 1606 } 1604 1607 -
zephyr.c
rd023c25 r2527615 384 384 385 385 if (numlocs==0) { 386 strcpy(out, "Hidden or not logged-in\n"); 386 myuser=short_zuser(user); 387 sprintf(out, "%s: Hidden or not logged-in\n", myuser); 388 owl_free(myuser); 387 389 return; 388 390 }
Note: See TracChangeset
for help on using the changeset viewer.