Changeset 952bb256
- Timestamp:
- Dec 22, 2003, 11:25:16 PM (19 years ago)
- 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
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
rb0430a6 r952bb256 1 1 $Id$ 2 2 3 2.1.1-pre-2 4 Added the 'aim search' command. The popup on callback may be 5 dangerous, should switch to an admin msg for results, or add a 6 new event queue 7 3 8 2.1.1-pre-1 4 9 Only print forced AIM logout message once. -
aim.c
rc8735aa r952bb256 280 280 } 281 281 282 void owl_aim_search(char *email) 283 { 284 int ret; 285 286 owl_function_debugmsg("owl_aim_search: doing search for %s", email); 287 ret=aim_search_address(owl_global_get_aimsess(&g), 288 aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS), 289 email); 290 291 if (ret) owl_function_error("owl_aim_search: aim_search_address returned %i", ret); 292 } 293 282 294 283 295 int owl_aim_set_awaymsg(char *msg) … … 571 583 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_RATECHANGE, faimtest_parse_ratechange, 0); 572 584 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_EVIL, faimtest_parse_evilnotify, 0); 585 573 586 aim_conn_addhandler(sess, bosconn, 0x000a, 0x0001, faimtest_parse_searcherror, 0); 574 587 aim_conn_addhandler(sess, bosconn, 0x000a, 0x0003, faimtest_parse_searchreply, 0); 588 589 /* 590 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, AIM_CB_LOK_ERROR, faimtest_parse_searcherror, 0); 591 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, 0x0003, faimtest_parse_searchreply, 0); 592 */ 593 575 594 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_ERROR, faimtest_parse_msgerr, 0); 576 595 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO, faimtest_parse_userinfo, 0); … … 1822 1841 char *address, *SNs; 1823 1842 int num, i; 1843 owl_list list; 1824 1844 1825 1845 va_start(ap, fr); … … 1828 1848 SNs = va_arg(ap, char *); 1829 1849 va_end(ap); 1850 1851 owl_list_create(&list); 1830 1852 1831 1853 owl_function_debugmsg("faimtest_parse_searchreply: E-Mail Search Results for %s: ", address); 1832 1833 for(i = 0; i < num; i++) { 1854 for (i=0; i<num; i++) { 1834 1855 owl_function_debugmsg(" %s", &SNs[i*(MAXSNLEN+1)]); 1835 } 1836 1837 return 1; 1856 owl_list_append_element(&list, &SNs[i*(MAXSNLEN+1)]); 1857 } 1858 owl_function_aimsearch_results(address, &list); 1859 owl_list_free_simple(&list); 1860 return(1); 1838 1861 } 1839 1862 … … 1846 1869 address = va_arg(ap, char *); 1847 1870 va_end(ap); 1848 1871 1872 owl_function_error("No results searching for %s", address); 1849 1873 owl_function_debugmsg("faimtest_parse_searcherror: E-Mail Search Results for %s: No Results or Invalid Email\n", address); 1850 1874 1851 return 1;1875 return(1); 1852 1876 } 1853 1877 -
commands.c
r2674412 r952bb256 237 237 "source <filename>", 238 238 "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 ""), 239 244 240 245 OWLCMD_ARGS("addbuddy", owl_command_addbuddy, OWL_CTX_INTERACTIVE, … … 961 966 sprintf(buff, "Owl version %s", OWL_VERSION_STRING); 962 967 owl_function_makemsg(buff); 968 } 969 970 char *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); 963 988 } 964 989 -
functions.c
r2de4f20 r952bb256 3426 3426 #endif 3427 3427 } 3428 3429 void owl_function_aimsearch_results(char *email, owl_list *namelist) 3430 { 3431 owl_fmtext fm; 3432 int i, j; 3433 3434 owl_fmtext_init_null(&fm); 3435 owl_fmtext_append_normal(&fm, "AIM screennames associated with "); 3436 owl_fmtext_append_normal(&fm, email); 3437 owl_fmtext_append_normal(&fm, ":\n"); 3438 3439 j=owl_list_get_size(namelist); 3440 for (i=0; i<j; i++) { 3441 owl_fmtext_append_normal(&fm, " "); 3442 owl_fmtext_append_normal(&fm, owl_list_get_element(namelist, i)); 3443 owl_fmtext_append_normal(&fm, "\n"); 3444 } 3445 3446 owl_function_popless_fmtext(&fm); 3447 owl_fmtext_free(&fm); 3448 } -
owl.h
r5a95b69 r952bb256 20 20 static const char owl_h_fileIdent[] = "$Id$"; 21 21 22 #define OWL_VERSION 2.1.1-pre- 123 #define OWL_VERSION_STRING "2.1.1-pre- 1"22 #define OWL_VERSION 2.1.1-pre-2 23 #define OWL_VERSION_STRING "2.1.1-pre-2" 24 24 25 25 /* Feature that is being tested to redirect stderr through a pipe.
Note: See TracChangeset
for help on using the changeset viewer.