]> andersk Git - libfaim.git/blame - aim_search.c
- Fri Dec 15 21:51:32 UTC 2000
[libfaim.git] / aim_search.c
CommitLineData
9de3ca7e 1
2/*
3 * aim_search.c
4 *
5 * TODO: Add aim_usersearch_name()
6 *
7 */
8
a25832e6 9#include <faim/aim.h>
9de3ca7e 10
c5ca2538 11faim_export unsigned long aim_usersearch_address(struct aim_session_t *sess,
12 struct aim_conn_t *conn,
13 char *address)
9de3ca7e 14{
5b79dc93 15 struct command_tx_struct *newpacket;
9de3ca7e 16
17 if (!address)
18 return -1;
19
b69540e3 20 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+strlen(address))))
5b79dc93 21 return -1;
9de3ca7e 22
5b79dc93 23 newpacket->lock = 1;
9de3ca7e 24
5b79dc93 25 aim_putsnac(newpacket->data, 0x000a, 0x0002, 0x0000, sess->snac_nextid);
9de3ca7e 26
5b79dc93 27 aimutil_putstr(newpacket->data+10, address, strlen(address));
9de3ca7e 28
5b79dc93 29 aim_tx_enqueue(sess, newpacket);
9de3ca7e 30
1ea867e3 31 aim_cachesnac(sess, 0x000a, 0x0002, 0x0000, address, strlen(address)+1);
9de3ca7e 32
1ea867e3 33 return sess->snac_nextid;
9de3ca7e 34}
35
This page took 0.05734 seconds and 5 git commands to generate.