Changeset 03ad7b2


Ignore:
Timestamp:
Jun 29, 2003, 1:44:19 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
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:
862371b
Parents:
290f290
Message:
'addbuddy aim' now works and 'delbuddy aim' mostly works
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r290f290 r03ad7b2  
    332.0.6-pre-1
    44        Initialze $owl::auth
     5        'addbuddy aim' now works and 'delbuddy aim' mostly works
    56       
    672.0.5
  • aim.c

    rdff8d8a r03ad7b2  
    177177void owl_aim_addbuddy(char *screenname)
    178178{
    179   aim_add_buddy(owl_global_get_aimsess(&g), owl_global_get_waitingconn(&g), screenname);
     179  const char **foo;
     180 
     181  /*
     182  aim_bos_setbuddylist(owl_global_get_aimsess(&g),
     183                       aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
     184                       foo);
     185  */
     186
     187  /*
     188  aim_add_buddy(owl_global_get_aimsess(&g),
     189                aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
     190                screenname);
     191  */
     192
     193  foo=(char *) owl_malloc(30);
     194  foo[0]=screenname;
     195  aim_ssi_addbuddies(owl_global_get_aimsess(&g),
     196                     aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
     197                     "Buddies", foo, 1);
     198  owl_free(foo);
     199
    180200}
    181201
    182202void owl_aim_delbuddy(char *screenname)
    183203{
    184   aim_remove_buddy(owl_global_get_aimsess(&g), NULL, screenname);
     204  /*
     205  aim_remove_buddy(owl_global_get_aimsess(&g),
     206                   aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
     207                   screenname);
     208  */
     209
     210  aim_ssi_delbuddies(owl_global_get_aimsess(&g),
     211                     aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
     212                     "Buddies", &screenname, 1);
     213
    185214}
    186215
     
    286315{
    287316  struct owlfaim_priv *priv = (struct owlfaim_priv *)sess->aux_data;
    288   struct client_info_s info = AIM_CLIENTINFO_KNOWNGOOD;
     317  struct client_info_s info = CLIENTINFO_AIM_KNOWNGOOD;
     318   
    289319  char *key;
    290320  va_list ap;
     
    434464  snprintf(profile, sizeof(profile), "Hello.<br>This is a test");
    435465  */
     466  strcpy(profile, "");
    436467
    437468  aim_reqpersonalinfo(sess, fr->conn);
    438469  aim_bos_reqlocaterights(sess, fr->conn);
    439470
    440   /*aim_bos_setprofile(sess, fr->conn, profile, awaymsg, AIM_CAPS_BUDDYICON | AIM_CAPS_CHAT | AIM_CAPS_GETFILE | AIM_CAPS_SENDFILE | AIM_CAPS_IMIMAGE | AIM_CAPS_GAMES | AIM_CAPS_SAVESTOCKS | AIM_CAPS_SENDBUDDYLIST | AIM_CAPS_ICQ | AIM_CAPS_ICQUNKNOWN | AIM_CAPS_ICQRTF | AIM_CAPS_ICQSERVERRELAY | AIM_CAPS_TRILLIANCRYPT); */
    441   aim_bos_setprofile(sess, fr->conn, profile, "", AIM_CAPS_SENDBUDDYLIST | AIM_CAPS_CHAT );
     471  /* aim_bos_setprofile(sess, fr->conn, profile, awaymsg, AIM_CAPS_BUDDYICON | AIM_CAPS_CHAT | AIM_CAPS_GETFILE | AIM_CAPS_SENDFILE | AIM_CAPS_IMIMAGE | AIM_CAPS_GAMES | AIM_CAPS_SAVESTOCKS | AIM_CAPS_SENDBUDDYLIST | AIM_CAPS_ICQ | AIM_CAPS_ICQUNKNOWN | AIM_CAPS_ICQRTF | AIM_CAPS_ICQSERVERRELAY | AIM_CAPS_TRILLIANCRYPT); */
     472  aim_bos_setprofile(sess, fr->conn, "", "", AIM_CAPS_SENDBUDDYLIST );
    442473  aim_bos_reqbuddyrights(sess, fr->conn);
    443474
     
    20872118        newbuf[z] = (z % 10)+0x30;
    20882119      newbuf[i] = '\0';
    2089       aim_send_im_direct(sess, fr->conn, newbuf);
     2120      aim_send_im_direct(sess, fr->conn, newbuf, strlen(newbuf), 0);
    20902121      free(newbuf);
    20912122    }
    20922123  } else if (strstr(msg, "goodday")) {
    2093     aim_send_im_direct(sess, fr->conn, "Good day to you, too");
     2124    aim_send_im_direct(sess, fr->conn, "Good day to you, too", 18, 0);
    20942125  } else {
    20952126    char newmsg[1024];
    20962127    snprintf(newmsg, sizeof(newmsg), "unknown (%s)\n", msg);
    2097     aim_send_im_direct(sess, fr->conn, newmsg);
     2128    aim_send_im_direct(sess, fr->conn, newmsg, strlen(newmsg), 0);
    20982129  }
    20992130
     
    21292160  aim_conn_addhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMTYPING, directim_typing, 0);
    21302161 
    2131   aim_send_im_direct(sess, newconn, "goodday");
     2162  aim_send_im_direct(sess, newconn, "goodday", 8, 0);
    21322163 
    21332164  /* printf("OFT: DirectIM: connected to %s\n", aim_directim_getsn(newconn)); */
     
    23012332  /* printf("requesting %d %s(%d long)\n", namelen, filename, filesize); */
    23022333 
    2303   aim_oft_getfile_request(sess, conn, filename, filesize);
     2334  /* aim_oft_getfile_request(sess, conn, filename, filesize); */
    23042335 
    23052336  free(filename);
     
    23612392static int faimtest_getfile_receive(aim_session_t *sess, aim_frame_t *fr, ...)
    23622393{
     2394  /* needs ot be fixed --kretch */
     2395#if 0
    23632396  va_list ap;
    23642397  aim_conn_t *conn;
     
    23662399  unsigned char data;
    23672400  int pos;
    2368  
     2401
     2402
    23692403  va_start(ap, fr);
    23702404  conn = va_arg(ap, aim_conn_t *);
     
    23822416
    23832417  aim_oft_getfile_end(sess, conn);
     2418#endif
    23842419  return 0;
    23852420}
     
    24132448  aim_conn_close(listenerconn);
    24142449  aim_conn_kill(sess, &listenerconn);
    2415  
     2450
     2451  /*   This doesn't work with the new libfaim */
    24162452  aim_conn_addhandler(sess, conn, AIM_CB_FAM_OFT, AIM_CB_OFT_GETFILEFILEREQ,  faimtest_getfile_filereq, 0);
    24172453  aim_conn_addhandler(sess, conn, AIM_CB_FAM_OFT, AIM_CB_OFT_GETFILEFILESEND, faimtest_getfile_filesend, 0);
     
    24982534    aim_conn_addhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMTYPING, directim_typing, 0);
    24992535    /* printf("OFT: DirectIM: connected to %s\n", userinfo->sn); */
    2500     aim_send_im_direct(sess, newconn, "goodday");
     2536    aim_send_im_direct(sess, newconn, "goodday", 7, 0);
    25012537  }
    25022538}
  • commands.c

    r94e4899 r03ad7b2  
    922922      return(NULL);
    923923    }
     924    /*
    924925    owl_function_makemsg("This function is not yet operational.  Stay tuned.");
    925926    return(NULL);
     927    */
    926928    owl_aim_addbuddy(argv[2]);
    927929    owl_function_makemsg("%s added as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g));
     
    948950      return(NULL);
    949951    }
     952    /*
    950953    owl_function_makemsg("This function is not yet operational.  Stay tuned.");
    951954    return(NULL);
     955    */
    952956    owl_aim_delbuddy(argv[2]);
    953957    owl_function_makemsg("%s deleted as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g));
Note: See TracChangeset for help on using the changeset viewer.