Index: protocols/oscar/aim.h
===================================================================
--- protocols/oscar/aim.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/aim.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -410,13 +410,4 @@
 #define AIM_USERINFO_PRESENT_SESSIONLEN   0x00000100
 
-const char *aim_userinfo_sn(aim_userinfo_t *ui);
-guint16 aim_userinfo_flags(aim_userinfo_t *ui);
-guint16 aim_userinfo_idle(aim_userinfo_t *ui);
-float aim_userinfo_warnlevel(aim_userinfo_t *ui);
-time_t aim_userinfo_membersince(aim_userinfo_t *ui);
-time_t aim_userinfo_onlinesince(aim_userinfo_t *ui);
-guint32 aim_userinfo_sessionlen(aim_userinfo_t *ui);
-int aim_userinfo_hascap(aim_userinfo_t *ui, guint32 cap);
-
 #define AIM_FLAG_UNCONFIRMED 	0x0001 /* "damned transients" */
 #define AIM_FLAG_ADMINISTRATOR	0x0002
@@ -474,5 +465,4 @@
 int aim_addtlvtochain16(aim_tlvlist_t **list, const guint16 t, const guint16 v);
 int aim_addtlvtochain32(aim_tlvlist_t **list, const guint16 type, const guint32 v);
-int aim_addtlvtochain_availmsg(aim_tlvlist_t **list, const guint16 type, const char *msg);
 int aim_addtlvtochain_raw(aim_tlvlist_t **list, const guint16 t, const guint16 l, const guint8 *v);
 int aim_addtlvtochain_caps(aim_tlvlist_t **list, const guint16 t, const guint32 caps);
@@ -601,10 +591,5 @@
 #define AIM_WARN_ANON                     0x01
 
-int aim_sendpauseack(aim_session_t *sess, aim_conn_t *conn);
-int aim_send_warning(aim_session_t *sess, aim_conn_t *conn, const char *destsn, guint32 flags);
-int aim_nop(aim_session_t *, aim_conn_t *);
 int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn);
-int aim_bos_setidle(aim_session_t *, aim_conn_t *, guint32);
-int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *);
 int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, guint32 caps);
 int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, guint32 mask);
@@ -615,6 +600,4 @@
 int aim_bos_reqbuddyrights(aim_session_t *, aim_conn_t *);
 int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *);
-int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy);
-int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy);
 int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, guint32 status);
 
@@ -644,6 +627,4 @@
 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST  0
 #define AIM_SENDMEMBLOCK_FLAG_ISHASH     1
-
-int aim_sendmemblock(aim_session_t *sess, aim_conn_t *conn, guint32 offset, guint32 len, const guint8 *buf, guint8 flag);
 
 #define AIM_GETINFO_GENERALINFO 0x00001
@@ -672,10 +653,7 @@
 #define AIM_TRANSFER_DENY_DECLINE 0x0001
 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002
-int aim_denytransfer(aim_session_t *sess, const char *sender, const guint8 *cookie, unsigned short code);
 aim_conn_t *aim_accepttransfer(aim_session_t *sess, aim_conn_t *conn, const char *sn, const guint8 *cookie, const guint8 *ip, guint16 listingfiles, guint16 listingtotsize, guint16 listingsize, guint32 listingchecksum, guint16 rendid);
 
 int aim_getinfo(aim_session_t *, aim_conn_t *, const char *, unsigned short);
-int aim_sendbuddyoncoming(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *info);
-int aim_sendbuddyoffgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn);
 
 #define AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED	0x00000001
@@ -745,7 +723,4 @@
 int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const char *msg, int msglen);
 int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance);
-int aim_chat_attachname(aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance);
-char *aim_chat_getname(aim_conn_t *conn);
-aim_conn_t *aim_chat_getconn(aim_session_t *, const char *name);
 
 int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn);
@@ -754,5 +729,4 @@
 
 int aim_chatnav_createroom(aim_session_t *sess, aim_conn_t *conn, const char *name, guint16 exchange);
-int aim_chat_leaveroom(aim_session_t *sess, const char *name);
 
 /* aim_util.c */
@@ -810,8 +784,4 @@
 
 
-int aimutil_putstr(u_char *, const char *, int);
-int aimutil_tokslen(char *toSearch, int index, char dl);
-int aimutil_itemcnt(char *toSearch, char dl);
-char *aimutil_itemidx(char *toSearch, int index, char dl);
 int aim_sncmp(const char *a, const char *b);
 
Index: protocols/oscar/aim_internal.h
===================================================================
--- protocols/oscar/aim_internal.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/aim_internal.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -112,7 +112,4 @@
 int aim_putsnac(aim_bstream_t *, guint16 family, guint16 type, guint16 flags, aim_snacid_t id);
 
-aim_conn_t *aim_cloneconn(aim_session_t *sess, aim_conn_t *src);
-void aim_clonehandlers(aim_session_t *sess, aim_conn_t *dest, aim_conn_t *src);
-
 int aim_oft_buildheader(unsigned char *,struct aim_fileheader_t *);
 
@@ -195,10 +192,7 @@
 
 int aim_extractuserinfo(aim_session_t *sess, aim_bstream_t *bs, aim_userinfo_t *);
-int aim_putuserinfo(aim_bstream_t *bs, aim_userinfo_t *info);
 
 int aim_chat_readroominfo(aim_bstream_t *bs, struct aim_chat_roominfo *outinfo);
 
-int aim_request_directim(aim_session_t *sess, const char *destsn, guint8 *ip, guint16 port, guint8 *ckret);
-int aim_request_sendfile(aim_session_t *sess, const char *sn, const char *filename, guint16 numfiles, guint32 totsize, guint8 *ip, guint16 port, guint8 *ckret);
 void aim_conn_close_rend(aim_session_t *sess, aim_conn_t *conn);
 void aim_conn_kill_rend(aim_session_t *sess, aim_conn_t *conn);
@@ -210,5 +204,4 @@
 int aim_reqrates(aim_session_t *, aim_conn_t *);
 int aim_rates_addparam(aim_session_t *, aim_conn_t *);
-int aim_rates_delparam(aim_session_t *, aim_conn_t *);
 
 #endif /* __AIM_INTERNAL_H__ */
Index: protocols/oscar/buddylist.c
===================================================================
--- protocols/oscar/buddylist.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/buddylist.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -91,60 +91,2 @@
 	return 0;
 }
-
-/*
- * aim_add_buddy()
- *
- * Adds a single buddy to your buddy list after login.
- *
- * XXX this should just be an extension of setbuddylist()
- *
- */
-int aim_add_buddy(aim_session_t *sess, aim_conn_t *conn, const char *sn)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sn || !strlen(sn))
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+1+strlen(sn))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0003, 0x0004, 0x0000, sn, strlen(sn)+1);
-	aim_putsnac(&fr->data, 0x0003, 0x0004, 0x0000, snacid);
-
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/*
- * XXX generalise to support removing multiple buddies (basically, its
- * the same as setbuddylist() but with a different snac subtype).
- *
- */
-int aim_remove_buddy(aim_session_t *sess, aim_conn_t *conn, const char *sn)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sn || !strlen(sn))
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+1+strlen(sn))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0003, 0x0005, 0x0000, sn, strlen(sn)+1);
-	aim_putsnac(&fr->data, 0x0003, 0x0005, 0x0000, snacid);
-
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
Index: protocols/oscar/buddylist.h
===================================================================
--- protocols/oscar/buddylist.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/buddylist.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -17,7 +17,3 @@
 #define AIM_CB_BUD_DEFAULT 0xffff
 
-/* aim_buddylist.c */
-int aim_add_buddy(aim_session_t *, aim_conn_t *, const char *);
-int aim_remove_buddy(aim_session_t *, aim_conn_t *, const char *);
-
 #endif /* __OSCAR_BUDDYLIST_H__ */
Index: protocols/oscar/chat.c
===================================================================
--- protocols/oscar/chat.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/chat.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -26,63 +26,4 @@
 
 	return;
-}
-
-char *aim_chat_getname(aim_conn_t *conn)
-{
-	struct chatconnpriv *ccp;
-
-	if (!conn)
-		return NULL;
-
-	if (conn->type != AIM_CONN_TYPE_CHAT)
-		return NULL;
-
-	ccp = (struct chatconnpriv *)conn->priv;
-
-	return ccp->name;
-}
-
-/* XXX get this into conn.c -- evil!! */
-aim_conn_t *aim_chat_getconn(aim_session_t *sess, const char *name)
-{
-	aim_conn_t *cur;
-
-	for (cur = sess->connlist; cur; cur = cur->next) {
-		struct chatconnpriv *ccp = (struct chatconnpriv *)cur->priv;
-
-		if (cur->type != AIM_CONN_TYPE_CHAT)
-			continue;
-		if (!cur->priv) {
-			imcb_error(sess->aux_data, "chat connection with no name!");
-			continue;
-		}
-
-		if (strcmp(ccp->name, name) == 0)
-			break;
-	}
-
-	return cur;
-}
-
-int aim_chat_attachname(aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance)
-{
-	struct chatconnpriv *ccp;
-
-	if (!conn || !roomname)
-		return -EINVAL;
-
-	if (conn->priv)
-		g_free(conn->priv);
-
-	if (!(ccp = g_malloc(sizeof(struct chatconnpriv))))
-		return -ENOMEM;
-
-	ccp->exchange = exchange;
-	ccp->name = g_strdup(roomname);
-	ccp->instance = instance;
-
-	conn->priv = (void *)ccp;
-
-	return 0;
 }
 
@@ -250,16 +191,4 @@
 	outinfo->name = aimbs_getstr(bs, namelen);
 	outinfo->instance = aimbs_get16(bs);
-
-	return 0;
-}
-
-int aim_chat_leaveroom(aim_session_t *sess, const char *name)
-{
-	aim_conn_t *conn;
-
-	if (!(conn = aim_chat_getconn(sess, name)))
-		return -ENOENT;
-
-	aim_conn_close(conn);
 
 	return 0;
Index: protocols/oscar/conn.c
===================================================================
--- protocols/oscar/conn.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/conn.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -351,48 +351,4 @@
 
 	return cur;
-}
-
-/**
- * aim_cloneconn - clone an aim_conn_t
- * @sess: session containing parent
- * @src: connection to clone
- *
- * A new connection is allocated, and the values are filled in
- * appropriately. Note that this function sets the new connnection's
- * ->priv pointer to be equal to that of its parent: only the pointer
- * is copied, not the data it points to.
- *
- * This function returns a pointer to the new aim_conn_t, or %NULL on
- * error
- */
-aim_conn_t *aim_cloneconn(aim_session_t *sess, aim_conn_t *src)
-{
-	aim_conn_t *conn;
-
-	if (!(conn = aim_conn_getnext(sess)))
-		return NULL;
-
-	conn->fd = src->fd;
-	conn->type = src->type;
-	conn->subtype = src->subtype;
-	conn->seqnum = src->seqnum;
-	conn->priv = src->priv;
-	conn->internal = src->internal;
-	conn->lastactivity = src->lastactivity;
-	conn->forcedlatency = src->forcedlatency;
-	conn->sessv = src->sessv;
-	aim_clonehandlers(sess, conn, src);
-
-	if (src->inside) {
-		/*
-		 * XXX should clone this section as well, but since currently
-		 * this function only gets called for some of that rendezvous
-		 * crap, and not on SNAC connections, its probably okay for
-		 * now. 
-		 *
-		 */
-	}
-
-	return conn;
 }
 
Index: protocols/oscar/icq.c
===================================================================
--- protocols/oscar/icq.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/icq.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -65,42 +65,4 @@
 	aimbs_putle16(&fr->data, 0x003e); /* I command thee. */
 	aimbs_putle16(&fr->data, snacid); /* eh. */
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-int aim_icq_sendxmlreq(aim_session_t *sess, const char *xml)
-{
-	aim_conn_t *conn;
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	int bslen;
-
-	if (!xml || !strlen(xml))
-		return -EINVAL;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0015)))
-		return -EINVAL;
-
-	bslen = 2 + 10 + 2 + strlen(xml) + 1;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4 + bslen)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0015, 0x0002, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0015, 0x0002, 0x0000, snacid);
-
-	/* For simplicity, don't bother using a tlvlist */
-	aimbs_put16(&fr->data, 0x0001);
-	aimbs_put16(&fr->data, bslen);
-
-	aimbs_putle16(&fr->data, bslen - 2);
-	aimbs_putle32(&fr->data, atoi(sess->sn));
-	aimbs_putle16(&fr->data, 0x07d0); /* I command thee. */
-	aimbs_putle16(&fr->data, snacid); /* eh. */
-	aimbs_putle16(&fr->data, 0x0998); /* shrug. */
-	aimbs_putle16(&fr->data, strlen(xml) + 1);
-	aimbs_putraw(&fr->data, (guint8 *)xml, strlen(xml) + 1);
 
 	aim_tx_enqueue(sess, fr);
@@ -152,41 +114,4 @@
 
         return 0;
-}
-
-int aim_icq_getsimpleinfo(aim_session_t *sess, const char *uin)
-{
-	aim_conn_t *conn;
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	int bslen;
-
-	if (!uin || uin[0] < '0' || uin[0] > '9')
-		return -EINVAL;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0015)))
-		return -EINVAL;
-
-	bslen = 2 + 4 + 2 + 2 + 2 + 4;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4 + bslen)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0015, 0x0002, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0015, 0x0002, 0x0000, snacid);
-
-	/* For simplicity, don't bother using a tlvlist */
-	aimbs_put16(&fr->data, 0x0001);
-	aimbs_put16(&fr->data, bslen);
-
-	aimbs_putle16(&fr->data, bslen - 2);
-	aimbs_putle32(&fr->data, atoi(sess->sn));
-	aimbs_putle16(&fr->data, 0x07d0); /* I command thee. */
-	aimbs_putle16(&fr->data, snacid); /* eh. */
-	aimbs_putle16(&fr->data, 0x051f); /* shrug. */
-	aimbs_putle32(&fr->data, atoi(uin));
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
 }
 
Index: protocols/oscar/icq.h
===================================================================
--- protocols/oscar/icq.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/icq.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -94,5 +94,4 @@
 int aim_icq_ackofflinemsgs(aim_session_t *sess);
 int aim_icq_getallinfo(aim_session_t *sess, const char *uin);
-int aim_icq_getsimpleinfo(aim_session_t *sess, const char *uin);
 
 #endif /* __OSCAR_ICQ_H__ */
Index: protocols/oscar/im.c
===================================================================
--- protocols/oscar/im.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/im.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -23,20 +23,4 @@
 #include "im.h"
 #include "info.h"
-
-/* This should be endian-safe now... but who knows... */
-guint16 aim_iconsum(const guint8 *buf, int buflen)
-{
-	guint32 sum;
-	int i;
-
-	for (i = 0, sum = 0; i + 1 < buflen; i += 2)
-		sum += (buf[i+1] << 8) + buf[i];
-	if (i < buflen)
-		sum += buf[i];
-
-	sum = ((sum & 0xffff0000) >> 16) + (sum & 0x0000ffff);
-
-	return (guint16)sum;
-}
 
 /*
@@ -306,481 +290,4 @@
 }
 
-/*
- * This is also performance sensitive. (If you can believe it...)
- *
- */
-int aim_send_icon(aim_session_t *sess, const char *sn, const guint8 *icon, int iconlen, time_t stamp, guint16 iconsum)
-{
-	aim_conn_t *conn;
-	int i;
-	guint8 ck[8];
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
-		return -EINVAL;
-
-	if (!sn || !icon || (iconlen <= 0) || (iconlen >= MAXICONLEN))
-		return -EINVAL;
-
-	for (i = 0; i < 8; i++)
-		aimutil_put8(ck+i, (guint8) rand());
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+8+2+1+strlen(sn)+2+2+2+8+16+2+2+2+2+2+2+2+4+4+4+iconlen+strlen(AIM_ICONIDENT)+2+2)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
-
-	/*
-	 * Cookie
-	 */
-	aimbs_putraw(&fr->data, ck, 8);
-
-	/*
-	 * Channel (2)
-	 */
-	aimbs_put16(&fr->data, 0x0002);
-
-	/*
-	 * Dest sn
-	 */
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	/*
-	 * TLV t(0005)
-	 *
-	 * Encompasses everything below.
-	 */
-	aimbs_put16(&fr->data, 0x0005);
-	aimbs_put16(&fr->data, 2+8+16+6+4+4+iconlen+4+4+4+strlen(AIM_ICONIDENT));
-
-	aimbs_put16(&fr->data, 0x0000);
-	aimbs_putraw(&fr->data, ck, 8);
-	aim_putcap(&fr->data, AIM_CAPS_BUDDYICON);
-
-	/* TLV t(000a) */
-	aimbs_put16(&fr->data, 0x000a);
-	aimbs_put16(&fr->data, 0x0002);
-	aimbs_put16(&fr->data, 0x0001);
-
-	/* TLV t(000f) */
-	aimbs_put16(&fr->data, 0x000f);
-	aimbs_put16(&fr->data, 0x0000);
-
-	/* TLV t(2711) */
-	aimbs_put16(&fr->data, 0x2711);
-	aimbs_put16(&fr->data, 4+4+4+iconlen+strlen(AIM_ICONIDENT));
-	aimbs_put16(&fr->data, 0x0000);
-	aimbs_put16(&fr->data, iconsum);
-	aimbs_put32(&fr->data, iconlen);
-	aimbs_put32(&fr->data, stamp);
-	aimbs_putraw(&fr->data, icon, iconlen);
-	aimbs_putraw(&fr->data, (guint8 *)AIM_ICONIDENT, strlen(AIM_ICONIDENT));
-
-	/* TLV t(0003) */
-	aimbs_put16(&fr->data, 0x0003);
-	aimbs_put16(&fr->data, 0x0000);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/*
- * This only works for ICQ 2001b (thats 2001 not 2000).  Better, only
- * send it to clients advertising the RTF capability.  In fact, if you send
- * it to a client that doesn't support that capability, the server will gladly
- * bounce it back to you.
- *
- * You'd think this would be in icq.c, but, well, I'm trying to stick with
- * the one-group-per-file scheme as much as possible.  This could easily
- * be an exception, since Rendezvous IMs are external of the Oscar core, 
- * and therefore are undefined.  Really I just need to think of a good way to
- * make an interface similar to what AOL actually uses.  But I'm not using COM.
- *
- */
-int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args)
-{
-	const char rtfcap[] = {"{97B12751-243C-4334-AD22-D6ABF73F1492}"}; /* AIM_CAPS_ICQRTF capability in string form */
-	aim_conn_t *conn;
-	int i;
-	guint8 ck[8];
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	int servdatalen;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
-		return -EINVAL;
-
-	if (!args || !args->destsn || !args->rtfmsg)
-		return -EINVAL;
-
-	servdatalen = 2+2+16+2+4+1+2  +  2+2+4+4+4  +  2+4+2+strlen(args->rtfmsg)+1  +  4+4+4+strlen(rtfcap)+1;
-
-	for (i = 0; i < 8; i++)
-		aimutil_put8(ck+i, (guint8) rand());
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+128+servdatalen)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
-
-	/*
-	 * Cookie
-	 */
-	aimbs_putraw(&fr->data, ck, 8);
-
-	/*
-	 * Channel (2)
-	 */
-	aimbs_put16(&fr->data, 0x0002);
-
-	/*
-	 * Dest sn
-	 */
-	aimbs_put8(&fr->data, strlen(args->destsn));
-	aimbs_putraw(&fr->data, (guint8 *)args->destsn, strlen(args->destsn));
-
-	/*
-	 * TLV t(0005)
-	 *
-	 * Encompasses everything below.
-	 */
-	aimbs_put16(&fr->data, 0x0005);
-	aimbs_put16(&fr->data, 2+8+16  +  2+2+2  +  2+2  +  2+2+servdatalen);
-
-	aimbs_put16(&fr->data, 0x0000);
-	aimbs_putraw(&fr->data, ck, 8);
-	aim_putcap(&fr->data, AIM_CAPS_ICQSERVERRELAY);
-
-	/*
-	 * t(000a) l(0002) v(0001)
-	 */
-	aimbs_put16(&fr->data, 0x000a);
-	aimbs_put16(&fr->data, 0x0002);
-	aimbs_put16(&fr->data, 0x0001);
-
-	/*
-	 * t(000f) l(0000) v()
-	 */
-	aimbs_put16(&fr->data, 0x000f);
-	aimbs_put16(&fr->data, 0x0000);
-
-	/*
-	 * Service Data TLV
-	 */
-	aimbs_put16(&fr->data, 0x2711);
-	aimbs_put16(&fr->data, servdatalen);
-
-	aimbs_putle16(&fr->data, 11 + 16 /* 11 + (sizeof CLSID) */);
-	aimbs_putle16(&fr->data, 9);
-	aim_putcap(&fr->data, AIM_CAPS_EMPTY);
-	aimbs_putle16(&fr->data, 0);
-	aimbs_putle32(&fr->data, 0);
-	aimbs_putle8(&fr->data, 0);
-	aimbs_putle16(&fr->data, 0x03ea); /* trid1 */
-
-	aimbs_putle16(&fr->data, 14);
-	aimbs_putle16(&fr->data, 0x03eb); /* trid2 */
-	aimbs_putle32(&fr->data, 0);
-	aimbs_putle32(&fr->data, 0);
-	aimbs_putle32(&fr->data, 0);
-
-	aimbs_putle16(&fr->data, 0x0001);
-	aimbs_putle32(&fr->data, 0);
-	aimbs_putle16(&fr->data, strlen(args->rtfmsg)+1);
-	aimbs_putraw(&fr->data, (guint8 *)args->rtfmsg, strlen(args->rtfmsg)+1);
-
-	aimbs_putle32(&fr->data, args->fgcolor);
-	aimbs_putle32(&fr->data, args->bgcolor);
-	aimbs_putle32(&fr->data, strlen(rtfcap)+1);
-	aimbs_putraw(&fr->data, (guint8 *)rtfcap, strlen(rtfcap)+1);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-int aim_request_directim(aim_session_t *sess, const char *destsn, guint8 *ip, guint16 port, guint8 *ckret)
-{
-	aim_conn_t *conn;
-	guint8 ck[8];
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	aim_tlvlist_t *tl = NULL, *itl = NULL;
-	int hdrlen, i;
-	guint8 *hdr;
-	aim_bstream_t hdrbs;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 256+strlen(destsn))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
-
-	/* 
-	 * Generate a random message cookie 
-	 *
-	 * This cookie needs to be alphanumeric and NULL-terminated to be 
-	 * TOC-compatible.
-	 *
-	 * XXX have I mentioned these should be generated in msgcookie.c?
-	 *
-	 */
-	for (i = 0; i < 7; i++)
-	       	ck[i] = 0x30 + ((guint8) rand() % 10);
-	ck[7] = '\0';
-
-	if (ckret)
-		memcpy(ckret, ck, 8);
-
-	/* Cookie */
-	aimbs_putraw(&fr->data, ck, 8);
-
-	/* Channel */
-	aimbs_put16(&fr->data, 0x0002);
-
-	/* Destination SN */
-	aimbs_put8(&fr->data, strlen(destsn));
-	aimbs_putraw(&fr->data, (guint8 *)destsn, strlen(destsn));
-
-	aim_addtlvtochain_noval(&tl, 0x0003);
-
-	hdrlen = 2+8+16+6+8+6+4;
-	hdr = g_malloc(hdrlen);
-	aim_bstream_init(&hdrbs, hdr, hdrlen);
-
-	aimbs_put16(&hdrbs, 0x0000);
-	aimbs_putraw(&hdrbs, ck, 8);
-	aim_putcap(&hdrbs, AIM_CAPS_IMIMAGE);
-
-	aim_addtlvtochain16(&itl, 0x000a, 0x0001);
-	aim_addtlvtochain_raw(&itl, 0x0003, 4, ip);
-	aim_addtlvtochain16(&itl, 0x0005, port);
-	aim_addtlvtochain_noval(&itl, 0x000f);
-	
-	aim_writetlvchain(&hdrbs, &itl);
-
-	aim_addtlvtochain_raw(&tl, 0x0005, aim_bstream_curpos(&hdrbs), hdr);
-
-	aim_writetlvchain(&fr->data, &tl);
-
-	g_free(hdr);
-	aim_freetlvchain(&itl);
-	aim_freetlvchain(&tl);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-int aim_request_sendfile(aim_session_t *sess, const char *sn, const char *filename, guint16 numfiles, guint32 totsize, guint8 *ip, guint16 port, guint8 *ckret)
-{
-	aim_conn_t *conn;
-	int i;
-	guint8 ck[8];
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
-		return -EINVAL;
-
-	if (!sn || !filename)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+8+2+1+strlen(sn)+2+2+2+8+16+6+8+6+4+2+2+2+2+4+strlen(filename)+4)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
-
-	for (i = 0; i < 7; i++)
-		aimutil_put8(ck+i, 0x30 + ((guint8) rand() % 10));
-	ck[7] = '\0';
-
-	if (ckret)
-		memcpy(ckret, ck, 8);
-
-	/*
-	 * Cookie
-	 */
-	aimbs_putraw(&fr->data, ck, 8);
-
-	/*
-	 * Channel (2)
-	 */
-	aimbs_put16(&fr->data, 0x0002);
-
-	/*
-	 * Dest sn
-	 */
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	/*
-	 * TLV t(0005)
-	 *
-	 * Encompasses everything below. Gee.
-	 */
-	aimbs_put16(&fr->data, 0x0005);
-	aimbs_put16(&fr->data, 2+8+16+6+8+6+4+2+2+2+2+4+strlen(filename)+4);
-
-	aimbs_put16(&fr->data, 0x0000);
-	aimbs_putraw(&fr->data, ck, 8);
-	aim_putcap(&fr->data, AIM_CAPS_SENDFILE);
-
-	/* TLV t(000a) */
-	aimbs_put16(&fr->data, 0x000a);
-	aimbs_put16(&fr->data, 0x0002);
-	aimbs_put16(&fr->data, 0x0001);
-
-	/* TLV t(0003) (IP) */
-	aimbs_put16(&fr->data, 0x0003);
-	aimbs_put16(&fr->data, 0x0004);
-	aimbs_putraw(&fr->data, ip, 4);
-
-	/* TLV t(0005) (port) */
-	aimbs_put16(&fr->data, 0x0005);
-	aimbs_put16(&fr->data, 0x0002);
-	aimbs_put16(&fr->data, port);
-
-	/* TLV t(000f) */
-	aimbs_put16(&fr->data, 0x000f);
-	aimbs_put16(&fr->data, 0x0000);
-
-	/* TLV t(2711) */
-	aimbs_put16(&fr->data, 0x2711);
-	aimbs_put16(&fr->data, 2+2+4+strlen(filename)+4);
-
-	/* ? */
-	aimbs_put16(&fr->data, 0x0001);
-	aimbs_put16(&fr->data, numfiles);
-	aimbs_put32(&fr->data, totsize);
-	aimbs_putraw(&fr->data, (guint8 *)filename, strlen(filename));
-
-	/* ? */
-	aimbs_put32(&fr->data, 0x00000000);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/**
- * Request the status message of the given ICQ user.
- *
- * @param sess The oscar session.
- * @param sn The UIN of the user of whom you wish to request info.
- * @param type The type of info you wish to request.  This should be the current 
- *        state of the user, as one of the AIM_ICQ_STATE_* defines.
- * @return Return 0 if no errors, otherwise return the error number.
- */
-int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type)
-{
-	aim_conn_t *conn;
-	int i;
-	guint8 ck[8];
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)) || !sn)
-		return -EINVAL;
-
-	for (i = 0; i < 8; i++)
-		aimutil_put8(ck+i, (guint8) rand());
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+8+2+1+strlen(sn) + 4+0x5e + 4)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
-
-	/* Cookie */
-	aimbs_putraw(&fr->data, ck, 8);
-
-	/* Channel (2) */
-	aimbs_put16(&fr->data, 0x0002);
-
-	/* Dest sn */
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	/* TLV t(0005) - Encompasses almost everything below. */
-	aimbs_put16(&fr->data, 0x0005); /* T */
-	aimbs_put16(&fr->data, 0x005e); /* L */
-	{ /* V */
-		aimbs_put16(&fr->data, 0x0000);
-
-		/* Cookie */
-		aimbs_putraw(&fr->data, ck, 8);
-
-		/* Put the 16 byte server relay capability */
-		aim_putcap(&fr->data, AIM_CAPS_ICQSERVERRELAY);
-
-		/* TLV t(000a) */
-		aimbs_put16(&fr->data, 0x000a);
-		aimbs_put16(&fr->data, 0x0002);
-		aimbs_put16(&fr->data, 0x0001);
-
-		/* TLV t(000f) */
-		aimbs_put16(&fr->data, 0x000f);
-		aimbs_put16(&fr->data, 0x0000);
-
-		/* TLV t(2711) */
-		aimbs_put16(&fr->data, 0x2711);
-		aimbs_put16(&fr->data, 0x0036);
-		{ /* V */
-			aimbs_putle16(&fr->data, 0x001b); /* L */
-			aimbs_putle16(&fr->data, 0x0008); /* AAA - Protocol version */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-			aimbs_putle16(&fr->data, 0x0000); /* Unknown */
-			aimbs_putle16(&fr->data, 0x0003); /* Client features? */
-			aimbs_putle16(&fr->data, 0x0000); /* Unknown */
-			aimbs_putle8(&fr->data, 0x00); /* Unkizown */
-			aimbs_putle16(&fr->data, 0xffff); /* Sequence number?  XXX - This should decrement by 1 with each request */
-
-			aimbs_putle16(&fr->data, 0x000e); /* L */
-			aimbs_putle16(&fr->data, 0xffff); /* Sequence number?  XXX - This should decrement by 1 with each request */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-			aimbs_putle32(&fr->data, 0x00000000); /* Unknown */
-
-			/* The type of status message being requested */
-			if (type & AIM_ICQ_STATE_CHAT)
-				aimbs_putle16(&fr->data, 0x03ec);
-			else if(type & AIM_ICQ_STATE_DND)
-				aimbs_putle16(&fr->data, 0x03eb);
-			else if(type & AIM_ICQ_STATE_OUT)
-				aimbs_putle16(&fr->data, 0x03ea);
-			else if(type & AIM_ICQ_STATE_BUSY)
-				aimbs_putle16(&fr->data, 0x03e9);
-			else if(type & AIM_ICQ_STATE_AWAY)
-				aimbs_putle16(&fr->data, 0x03e8);
-
-			aimbs_putle16(&fr->data, 0x0000); /* Status? */
-			aimbs_putle16(&fr->data, 0x0001); /* Priority of this message? */
-			aimbs_putle16(&fr->data, 0x0001); /* L? */
-			aimbs_putle8(&fr->data, 0x00); /* Null termination? */
-		} /* End TLV t(2711) */
-	} /* End TLV t(0005) */
-
-	/* TLV t(0003) */
-	aimbs_put16(&fr->data, 0x0003);
-	aimbs_put16(&fr->data, 0x0000);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
 /**
  * answers status message requests
@@ -989,59 +496,4 @@
 	mpm->numparts++;
 
-	return 0;
-}
-
-int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, guint16 charset, guint16 charsubset, const guint8 *data, guint16 datalen)
-{
-	guint8 *dup;
-
-	if (!(dup = g_malloc(datalen)))
-		return -1;
-	memcpy(dup, data, datalen);
-
-	if (mpmsg_addsection(sess, mpm, charset, charsubset, dup, datalen) == -1) {
-		g_free(dup);
-		return -1;
-	}
-
-	return 0;
-}
-
-/* XXX should provide a way of saying ISO-8859-1 specifically */
-int aim_mpmsg_addascii(aim_session_t *sess, aim_mpmsg_t *mpm, const char *ascii)
-{
-	char *dup;
-
-	if (!(dup = g_strdup(ascii))) 
-		return -1;
-
-	if (mpmsg_addsection(sess, mpm, 0x0000, 0x0000, (guint8 *)dup, (guint16) strlen(ascii)) == -1) {
-		g_free(dup);
-		return -1;
-	}
-
-	return 0;
-}
-
-int aim_mpmsg_addunicode(aim_session_t *sess, aim_mpmsg_t *mpm, const guint16 *unicode, guint16 unicodelen)
-{
-	guint8 *buf;
-	aim_bstream_t bs;
-	int i;
-
-	if (!(buf = g_malloc(unicodelen * 2)))
-		return -1;
-
-	aim_bstream_init(&bs, buf, unicodelen * 2);
-
-	/* We assume unicode is in /host/ byte order -- convert to network */
-	for (i = 0; i < unicodelen; i++)
-		aimbs_put16(&bs, unicode[i]);
-
-	if (mpmsg_addsection(sess, mpm, 0x0002, 0x0000, buf, aim_bstream_curpos(&bs)) == -1) {
-		g_free(buf);
-		return -1;
-	}
-	
 	return 0;
 }
@@ -1727,42 +1179,4 @@
 
 	return ret;
-}
-
-/*
- * Possible codes:
- *    AIM_TRANSFER_DENY_NOTSUPPORTED -- "client does not support"
- *    AIM_TRANSFER_DENY_DECLINE -- "client has declined transfer"
- *    AIM_TRANSFER_DENY_NOTACCEPTING -- "client is not accepting transfers"
- * 
- */
-int aim_denytransfer(aim_session_t *sess, const char *sender, const guint8 *cookie, guint16 code)
-{
-	aim_conn_t *conn;
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	aim_tlvlist_t *tl = NULL;
-	
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+8+2+1+strlen(sender)+6)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x000b, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0004, 0x000b, 0x0000, snacid);
-	
-	aimbs_putraw(&fr->data, cookie, 8);
-
-	aimbs_put16(&fr->data, 0x0002); /* channel */
-	aimbs_put8(&fr->data, strlen(sender));
-	aimbs_putraw(&fr->data, (guint8 *)sender, strlen(sender));
-
-	aim_addtlvtochain16(&tl, 0x0003, code);
-	aim_writetlvchain(&fr->data, &tl);
-	aim_freetlvchain(&tl);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
 }
 
Index: protocols/oscar/im.h
===================================================================
--- protocols/oscar/im.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/im.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -47,7 +47,4 @@
 
 int aim_mpmsg_init(aim_session_t *sess, aim_mpmsg_t *mpm);
-int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, guint16 charset, guint16 charsubset, const guint8 *data, guint16 datalen);
-int aim_mpmsg_addascii(aim_session_t *sess, aim_mpmsg_t *mpm, const char *ascii);
-int aim_mpmsg_addunicode(aim_session_t *sess, aim_mpmsg_t *mpm, const guint16 *unicode, guint16 unicodelen);
 void aim_mpmsg_free(aim_session_t *sess, aim_mpmsg_t *mpm);
 
@@ -83,14 +80,4 @@
 	guint16 charset;
 	guint16 charsubset;
-};
-
-/*
- * Arguments to aim_send_rtfmsg().
- */
-struct aim_sendrtfmsg_args {
-	const char *destsn;
-	guint32 fgcolor;
-	guint32 bgcolor;
-	const char *rtfmsg; /* must be in RTF */
 };
 
@@ -183,9 +170,6 @@
 };
 
-int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args);
 int aim_send_im_ext(aim_session_t *sess, struct aim_sendimext_args *args);
 int aim_send_im(aim_session_t *, const char *destsn, unsigned short flags, const char *msg);
-int aim_send_icon(aim_session_t *sess, const char *sn, const guint8 *icon, int iconlen, time_t stamp, guint16 iconsum);
-guint16 aim_iconsum(const guint8 *buf, int buflen);
 int aim_send_typing(aim_session_t *sess, aim_conn_t *conn, int typing);
 int aim_send_im_direct(aim_session_t *, aim_conn_t *, const char *msg, int len);
@@ -194,5 +178,4 @@
 aim_conn_t *aim_directim_connect(aim_session_t *, const char *sn, const char *addr, const guint8 *cookie);
 
-int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type);
 int aim_im_sendmtn(aim_session_t *sess, guint16 type1, const char *sn, guint16 type2);
 int aim_send_im_ch2_statusmessage(aim_session_t *sess, const char *sender, const guint8 *cookie, const char *message, const guint8 state, const guint16 dc);
Index: protocols/oscar/info.c
===================================================================
--- protocols/oscar/info.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/info.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -40,77 +40,4 @@
 	return 0;
 }
-
-const char *aim_userinfo_sn(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return NULL;
-
-	return ui->sn;
-}
-
-guint16 aim_userinfo_flags(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return 0;
-
-	return ui->flags;
-}
-
-guint16 aim_userinfo_idle(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return 0;
-
-	return ui->idletime;
-}
-
-float aim_userinfo_warnlevel(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return 0.00;
-
-	return (ui->warnlevel / 10);
-}
-
-time_t aim_userinfo_membersince(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return 0;
-
-	return (time_t)ui->membersince;
-}
-
-time_t aim_userinfo_onlinesince(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return 0;
-
-	return (time_t)ui->onlinesince;
-}
-
-guint32 aim_userinfo_sessionlen(aim_userinfo_t *ui)
-{
-
-	if (!ui)
-		return 0;
-
-	return ui->sessionlen;
-}
-
-int aim_userinfo_hascap(aim_userinfo_t *ui, guint32 cap)
-{
-
-	if (!ui || !(ui->present & AIM_USERINFO_PRESENT_CAPABILITIES))
-		return -1;
-
-	return !!(ui->capabilities & cap);
-}
-
 
 /*
@@ -482,111 +409,4 @@
 		aim_bstream_setpos(bs, endpos);
 	}
-
-	return 0;
-}
-
-/*
- * Inverse of aim_extractuserinfo()
- */
-int aim_putuserinfo(aim_bstream_t *bs, aim_userinfo_t *info)
-{
-	aim_tlvlist_t *tlvlist = NULL;
-
-	if (!bs || !info)
-		return -EINVAL;
-
-	aimbs_put8(bs, strlen(info->sn));
-	aimbs_putraw(bs, (guint8 *)info->sn, strlen(info->sn));
-
-	aimbs_put16(bs, info->warnlevel);
-
-
-	aim_addtlvtochain16(&tlvlist, 0x0001, info->flags);
-	aim_addtlvtochain32(&tlvlist, 0x0002, info->membersince);
-	aim_addtlvtochain32(&tlvlist, 0x0003, info->onlinesince);
-	aim_addtlvtochain16(&tlvlist, 0x0004, info->idletime);
-
-#if ICQ_OSCAR_SUPPORT
-	if (atoi(info->sn) != 0) {
-		aim_addtlvtochain16(&tlvlist, 0x0006, info->icqinfo.status);
-		aim_addtlvtochain32(&tlvlist, 0x000a, info->icqinfo.ipaddr);
-	}
-#endif
-
-	aim_addtlvtochain_caps(&tlvlist, 0x000d, info->capabilities);
-
-	aim_addtlvtochain32(&tlvlist, (guint16)((info->flags & AIM_FLAG_AOL) ? 0x0010 : 0x000f), info->sessionlen);
-
-	aimbs_put16(bs, aim_counttlvchain(&tlvlist));
-	aim_writetlvchain(bs, &tlvlist);
-	aim_freetlvchain(&tlvlist);
-
-	return 0;
-}
-
-int aim_sendbuddyoncoming(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *info)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !conn || !info)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0003, 0x000b, 0x0000, NULL, 0);
-	
-	aim_putsnac(&fr->data, 0x0003, 0x000b, 0x0000, snacid);
-	aim_putuserinfo(&fr->data, info);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-int aim_sendbuddyoffgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !conn || !sn)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+1+strlen(sn))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0003, 0x000c, 0x0000, NULL, 0);
-	
-	aim_putsnac(&fr->data, 0x0003, 0x000c, 0x0000, snacid);
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/*
- * Huh? What is this?
- */
-int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !conn || !sn)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+1+strlen(sn))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0002, 0x000b, 0x0000, NULL, 0);
-	
-	aim_putsnac(&fr->data, 0x0002, 0x000b, 0x0000, snacid);
-	aimbs_put8(&fr->data, strlen(sn));
-	aimbs_putraw(&fr->data, (guint8 *)sn, strlen(sn));
-
-	aim_tx_enqueue(sess, fr);
 
 	return 0;
Index: protocols/oscar/info.h
===================================================================
--- protocols/oscar/info.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/info.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -40,5 +40,3 @@
 #define AIM_CAPS_LAST           0x00200000
 
-int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn);
-
 #endif /* __OSCAR_INFO_H__ */
Index: protocols/oscar/misc.c
===================================================================
--- protocols/oscar/misc.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/misc.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -13,54 +13,4 @@
 
 #include <aim.h> 
-
-/*
- * aim_bos_setbuddylist(buddylist)
- *
- * This just builds the "set buddy list" command then queues it.
- *
- * buddy_list = "Screen Name One&ScreenNameTwo&";
- *
- * TODO: Clean this up.  
- *
- * XXX: I can't stress the TODO enough.
- *
- */
-int aim_bos_setbuddylist(aim_session_t *sess, aim_conn_t *conn, const char *buddy_list)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	int len = 0;
-	char *localcpy = NULL;
-	char *tmpptr = NULL;
-
-	if (!buddy_list || !(localcpy = g_strdup(buddy_list))) 
-		return -EINVAL;
-
-	for (tmpptr = strtok(localcpy, "&"); tmpptr; ) {
-		len += 1 + strlen(tmpptr);
-		tmpptr = strtok(NULL, "&");
-	}
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+len)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0003, 0x0004, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0003, 0x0004, 0x0000, snacid);
-
-	strncpy(localcpy, buddy_list, strlen(buddy_list) + 1);
-
-	for (tmpptr = strtok(localcpy, "&"); tmpptr; ) {
-
-		aimbs_put8(&fr->data, strlen(tmpptr));
-		aimbs_putraw(&fr->data, (guint8 *)tmpptr, strlen(tmpptr));
-		tmpptr = strtok(NULL, "&");
-	}
-
-	aim_tx_enqueue(sess, fr);
-
-	g_free(localcpy);
-
-	return 0;
-}
 
 /* 
@@ -127,38 +77,4 @@
 
 /*
- * Send a warning to destsn.
- * 
- * Flags:
- *  AIM_WARN_ANON  Send as an anonymous (doesn't count as much)
- *
- * returns -1 on error (couldn't alloc packet), 0 on success. 
- *
- */
-int aim_send_warning(aim_session_t *sess, aim_conn_t *conn, const char *destsn, guint32 flags)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	guint16 outflags = 0x0000;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, strlen(destsn)+13)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0004, 0x0008, 0x0000, destsn, strlen(destsn)+1);
-
-	aim_putsnac(&fr->data, 0x0004, 0x0008, 0x0000, snacid);
-
-	if (flags & AIM_WARN_ANON)
-		outflags |= 0x0001;
-
-	aimbs_put16(&fr->data, outflags); 
-	aimbs_put8(&fr->data, strlen(destsn));
-	aimbs_putraw(&fr->data, (guint8 *)destsn, strlen(destsn));
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/*
  * Generic routine for sending commands.
  *
@@ -254,88 +170,4 @@
 {
 	return aim_genericreq_n(sess, conn, 0x0002, 0x0002);
-}
-
-/* 
- * Set directory profile data (not the same as aim_bos_setprofile!)
- *
- * privacy: 1 to allow searching, 0 to disallow.
- */
-int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy) 
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	aim_tlvlist_t *tl = NULL;
-
-
-	aim_addtlvtochain16(&tl, 0x000a, privacy);
-
-	if (first)
-		aim_addtlvtochain_raw(&tl, 0x0001, strlen(first), (guint8 *)first);
-	if (last)
-		aim_addtlvtochain_raw(&tl, 0x0002, strlen(last), (guint8 *)last);
-	if (middle)
-		aim_addtlvtochain_raw(&tl, 0x0003, strlen(middle), (guint8 *)middle);
-	if (maiden)
-		aim_addtlvtochain_raw(&tl, 0x0004, strlen(maiden), (guint8 *)maiden);
-
-	if (state)
-		aim_addtlvtochain_raw(&tl, 0x0007, strlen(state), (guint8 *)state);
-	if (city)
-		aim_addtlvtochain_raw(&tl, 0x0008, strlen(city), (guint8 *)city);
-
-	if (nickname)
-		aim_addtlvtochain_raw(&tl, 0x000c, strlen(nickname), (guint8 *)nickname);
-	if (zip)
-		aim_addtlvtochain_raw(&tl, 0x000d, strlen(zip), (guint8 *)zip);
-
-	if (street)
-		aim_addtlvtochain_raw(&tl, 0x0021, strlen(street), (guint8 *)street);
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+aim_sizetlvchain(&tl))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0002, 0x0009, 0x0000, NULL, 0);
-	
-	aim_putsnac(&fr->data, 0x0002, 0x0009, 0x0000, snacid);
-	aim_writetlvchain(&fr->data, &tl);
-	aim_freetlvchain(&tl);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/* XXX pass these in better */
-int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy)
-{
-	aim_frame_t *fr;
-	aim_tlvlist_t *tl = NULL;
-
-	/* ?? privacy ?? */
-	aim_addtlvtochain16(&tl, 0x000a, privacy);
-
-	if (interest1)
-		aim_addtlvtochain_raw(&tl, 0x0000b, strlen(interest1), (guint8 *)interest1);
-	if (interest2)
-		aim_addtlvtochain_raw(&tl, 0x0000b, strlen(interest2), (guint8 *)interest2);
-	if (interest3)
-		aim_addtlvtochain_raw(&tl, 0x0000b, strlen(interest3), (guint8 *)interest3);
-	if (interest4)
-		aim_addtlvtochain_raw(&tl, 0x0000b, strlen(interest4), (guint8 *)interest4);
-	if (interest5)
-		aim_addtlvtochain_raw(&tl, 0x0000b, strlen(interest5), (guint8 *)interest5);
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+aim_sizetlvchain(&tl))))
-		return -ENOMEM;
-
-	aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0);
-
-	aim_putsnac(&fr->data, 0x0002, 0x000f, 0x0000, 0);
-	aim_writetlvchain(&fr->data, &tl);
-	aim_freetlvchain(&tl);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
 }
 
Index: protocols/oscar/oscar_util.c
===================================================================
--- protocols/oscar/oscar_util.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/oscar_util.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -1,94 +1,4 @@
 #include <aim.h>
 #include <ctype.h>
-
-int aimutil_putstr(u_char *dest, const char *src, int len)
-{
-	memcpy(dest, src, len);
-	return len;
-}
-
-/*
- * Tokenizing functions.  Used to portably replace strtok/sep.
- *   -- DMP.
- *
- */
-int aimutil_tokslen(char *toSearch, int index, char dl)
-{
-	int curCount = 1;
-	char *next;
-	char *last;
-	int toReturn;
-
-	last = toSearch;
-	next = strchr(toSearch, dl);
-
-	while(curCount < index && next != NULL) {
-		curCount++;
-		last = next + 1;
-		next = strchr(last, dl);
-	}
-
-	if ((curCount < index) || (next == NULL))
-		toReturn = strlen(toSearch) - (curCount - 1);
-	else
-		toReturn = next - toSearch - (curCount - 1);
-
-	return toReturn;
-}
-
-int aimutil_itemcnt(char *toSearch, char dl)
-{
-	int curCount;
-	char *next;
-
-	curCount = 1;
-
-	next = strchr(toSearch, dl);
-
-	while(next != NULL) {
-		curCount++;
-		next = strchr(next + 1, dl);
-	}
-
-	return curCount;
-}
-
-char *aimutil_itemidx(char *toSearch, int index, char dl)
-{
-	int curCount;
-	char *next;
-	char *last;
-	char *toReturn;
-
-	curCount = 0;
-
-	last = toSearch;
-	next = strchr(toSearch, dl);
-
-	while (curCount < index && next != NULL) {
-		curCount++;
-		last = next + 1;
-		next = strchr(last, dl);
-	}
-
-	if (curCount < index) {
-		toReturn = g_strdup("");
-	}
-	next = strchr(last, dl);
-
-	if (curCount < index) {
-		toReturn = g_strdup("");
-	} else {
-		if (next == NULL) {
-			toReturn = g_malloc((strlen(last) + 1) * sizeof(char));
-			strcpy(toReturn, last);
-		} else {
-			toReturn = g_malloc((next - last + 1) * sizeof(char));
-			memcpy(toReturn, last, (next - last));
-			toReturn[next - last] = '\0';
-		}
-	}
-	return toReturn;
-}
 
 /*
Index: protocols/oscar/rxhandlers.c
===================================================================
--- protocols/oscar/rxhandlers.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/rxhandlers.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -286,16 +286,4 @@
 }
 
-void aim_clonehandlers(aim_session_t *sess, aim_conn_t *dest, aim_conn_t *src)
-{
-	struct aim_rxcblist_s *cur;
-
-	for (cur = (struct aim_rxcblist_s *)src->handlerlist; cur; cur = cur->next) {
-		aim_conn_addhandler(sess, dest, cur->family, cur->type, 
-						cur->handler, cur->flags);
-	}
-
-	return;
-}
-
 static int aim_callhandler_noparam(aim_session_t *sess, aim_conn_t *conn,guint16 family, guint16 type, aim_frame_t *ptr)
 {
Index: protocols/oscar/search.c
===================================================================
--- protocols/oscar/search.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/search.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -8,25 +8,4 @@
 
 #include <aim.h>
-
-int aim_usersearch_address(aim_session_t *sess, aim_conn_t *conn, const char *address)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !conn || !address)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+strlen(address))))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x000a, 0x0002, 0x0000, g_strdup(address), strlen(address)+1);
-	aim_putsnac(&fr->data, 0x000a, 0x0002, 0x0000, snacid);
-	
-	aimbs_putraw(&fr->data, (guint8 *)address, strlen(address)); 
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
 
 /* XXX can this be integrated with the rest of the error handling? */
Index: protocols/oscar/search.h
===================================================================
--- protocols/oscar/search.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/search.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -2,5 +2,3 @@
 #define __OSCAR_SEARCH_H__
 
-int aim_usersearch_address(aim_session_t *, aim_conn_t *, const char *);
-
 #endif /* __OSCAR_SEARCH_H__ */
Index: protocols/oscar/service.c
===================================================================
--- protocols/oscar/service.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/service.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -352,26 +352,4 @@
 	snacid = aim_cachesnac(sess, 0x0001, 0x0008, 0x0000, NULL, 0);
 	aim_putsnac(&fr->data, 0x0001, 0x0008, 0x0000, snacid);
-
-	for (rc = ins->rates; rc; rc = rc->next)
-		aimbs_put16(&fr->data, rc->classid);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
-/* Delete Rate Parameter (group 1, type 9) */
-int aim_rates_delparam(aim_session_t *sess, aim_conn_t *conn)
-{
-	aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside;
-	aim_frame_t *fr;	
-	aim_snacid_t snacid;
-	struct rateclass *rc;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 512)))
-		return -ENOMEM; 
-
-	snacid = aim_cachesnac(sess, 0x0001, 0x0009, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0001, 0x0009, 0x0000, snacid);
 
 	for (rc = ins->rates; rc; rc = rc->next)
@@ -431,41 +409,4 @@
 }
 
-/*
- * Service Pause Acknowledgement (group 1, type 0x0c)
- *
- * It is rather important that aim_sendpauseack() gets called for the exact
- * same connection that the Server Pause callback was called for, since
- * libfaim extracts the data for the SNAC from the connection structure.
- *
- * Of course, if you don't do that, more bad things happen than just what
- * libfaim can cause.
- *
- */
-int aim_sendpauseack(aim_session_t *sess, aim_conn_t *conn)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-	aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside;
-	struct snacgroup *sg;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1024)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0001, 0x000c, 0x0000, NULL, 0);
-	aim_putsnac(&fr->data, 0x0001, 0x000c, 0x0000, snacid);
-
-	/*
-	 * This list should have all the groups that the original 
-	 * Host Online / Server Ready said this host supports.  And 
-	 * we want them all back after the migration.
-	 */
-	for (sg = ins->groups; sg; sg = sg->next)
-		aimbs_put16(&fr->data, sg->group);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
-}
-
 /* Service Resume (group 1, type 0x0d) */
 static int serverresume(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
@@ -517,18 +458,4 @@
 
 	return 0;
-}
-
-/*
- * Idle Notification (group 1, type 0x11)
- *
- * Should set your current idle time in seconds.  Note that this should
- * never be called consecutively with a non-zero idle time.  That makes
- * OSCAR do funny things.  Instead, just set it once you go idle, and then
- * call it again with zero when you're back.
- *
- */
-int aim_bos_setidle(aim_session_t *sess, aim_conn_t *conn, guint32 idletime)
-{
-	return aim_genericreq_l(sess, conn, 0x0001, 0x0011, &idletime);
 }
 
@@ -637,15 +564,4 @@
 }
 
-/*
- * No-op (group 1, type 0x16)
- *
- * WinAIM sends these every 4min or so to keep the connection alive.  Its not 
- * real necessary.
- *
- */
-int aim_nop(aim_session_t *sess, aim_conn_t *conn)
-{
-	return aim_genericreq_n(sess, conn, 0x0001, 0x0016);
-}
 
 /* 
@@ -807,92 +723,4 @@
 	g_free(modname);
 	aim_freetlvchain(&list);
-
-	return 0;
-}
-
-/* Client verification reply (group 1, subtype 0x20) */
-int aim_sendmemblock(aim_session_t *sess, aim_conn_t *conn, guint32 offset, guint32 len, const guint8 *buf, guint8 flag)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !conn)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2+16)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, 0x0001, 0x0020, 0x0000, NULL, 0);
-
-	aim_putsnac(&fr->data, 0x0001, 0x0020, 0x0000, snacid);
-	aimbs_put16(&fr->data, 0x0010); /* md5 is always 16 bytes */
-
-	if ((flag == AIM_SENDMEMBLOCK_FLAG_ISHASH) && buf && (len == 0x10)) { /* we're getting a hash */
-
-		aimbs_putraw(&fr->data, buf, 0x10); 
-
-	} else if (buf && (len > 0)) { /* use input buffer */
-		md5_state_t state;
-		md5_byte_t digest[0x10];
-
-		md5_init(&state);	
-		md5_append(&state, (const md5_byte_t *)buf, len);
-		md5_finish(&state, digest);
-
-		aimbs_putraw(&fr->data, (guint8 *)digest, 0x10);
-
-	} else if (len == 0) { /* no length, just hash NULL (buf is optional) */
-		md5_state_t state;
-		guint8 nil = '\0';
-		md5_byte_t digest[0x10];
-
-		/*
-		 * These MD5 routines are stupid in that you have to have
-		 * at least one append.  So thats why this doesn't look 
-		 * real logical.
-		 */
-		md5_init(&state);
-		md5_append(&state, (const md5_byte_t *)&nil, 0);
-		md5_finish(&state, digest);
-
-		aimbs_putraw(&fr->data, (guint8 *)digest, 0x10);
-
-	} else {
-
-		/* 
-		 * This data is correct for AIM 3.5.1670.
-		 *
-		 * Using these blocks is as close to "legal" as you can get
-		 * without using an AIM binary.
-		 *
-		 */
-		if ((offset == 0x03ffffff) && (len == 0x03ffffff)) {
-
-#if 1 /* with "AnrbnrAqhfzcd" */
-			aimbs_put32(&fr->data, 0x44a95d26);
-			aimbs_put32(&fr->data, 0xd2490423);
-			aimbs_put32(&fr->data, 0x93b8821f);
-			aimbs_put32(&fr->data, 0x51c54b01);
-#else /* no filename */
-			aimbs_put32(&fr->data, 0x1df8cbae);
-			aimbs_put32(&fr->data, 0x5523b839);
-			aimbs_put32(&fr->data, 0xa0e10db3);
-			aimbs_put32(&fr->data, 0xa46d3b39);
-#endif
-
-/* len can't be 0 here anyway...
-		} else if ((offset == 0x00001000) && (len == 0x00000000)) {
-
-			aimbs_put32(&fr->data, 0xd41d8cd9);
-			aimbs_put32(&fr->data, 0x8f00b204);
-			aimbs_put32(&fr->data, 0xe9800998);
-			aimbs_put32(&fr->data, 0xecf8427e);
-*/
-		} else
-			imcb_error(sess->aux_data, "Warning: unknown hash request");
-
-	}
-
-	aim_tx_enqueue(sess, fr);
 
 	return 0;
Index: protocols/oscar/ssi.c
===================================================================
--- protocols/oscar/ssi.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/ssi.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -263,26 +263,4 @@
 
 /**
- * Locally find the presence flag item, and return the setting.  The returned setting is a 
- * bitmask of the user flags that you are visible to.  See the AIM_FLAG_* #defines 
- * in aim.h
- *
- * @param list A pointer to the current list of items.
- * @return Return the current visibility mask.
- */
-guint32 aim_ssi_getpresence(struct aim_ssi_item *list)
-{
-	struct aim_ssi_item *cur = aim_ssi_itemlist_finditem(list, NULL, NULL, AIM_SSI_TYPE_PRESENCEPREFS);
-	if (cur) {
-		aim_tlvlist_t *tlvlist = cur->data;
-		if (tlvlist) {
-			aim_tlv_t *tlv = aim_gettlv(tlvlist, 0x00c9, 1);
-			if (tlv && tlv->length)
-				return aimutil_get32(tlv->value);
-		}
-	}
-	return 0xFFFFFFFF;
-}
-
-/**
  * Add the given packet to the holding queue.  We totally need to send SSI SNACs one at 
  * a time, so we have a local queue where packets get put before they are sent, and 
@@ -345,141 +323,4 @@
 
 /**
- * Send SNACs necessary to remove all SSI data from the server list, 
- * and then free the local copy as well.
- *
- * @param sess The oscar session.
- * @param conn The bos connection for this session.
- * @return Return 0 if no errors, otherwise return the error number.
- */
-int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn)
-{
-	int num;
-	struct aim_ssi_item *cur, **items;
-
-	for (cur=sess->ssi.items, num=0; cur; cur=cur->next)
-		num++;
-
-	if (!(items = g_new0(struct aim_ssi_item *, num)))
-		return -ENOMEM;
-
-	for (cur=sess->ssi.items, num=0; cur; cur=cur->next) {
-		items[num] = cur;
-		num++;
-	}
-
-	aim_ssi_addmoddel(sess, conn, items, num, AIM_CB_SSI_DEL);
-	g_free(items);
-	aim_ssi_dispatch(sess, conn);
-	aim_ssi_freelist(sess);
-
-	return 0;
-}
-
-/**
- * This "cleans" the ssi list.  It does a few things, with the intent of making 
- * sure there ain't nothin' wrong with your SSI.
- *   -Make sure all buddies are in a group, and all groups have the correct 
- *     additional data.
- *   -Make sure there are no empty groups in the list.  While there is nothing 
- *     wrong empty groups in the SSI, it's wiser to not have them.
- *
- * @param sess The oscar session.
- * @param conn The bos connection for this session.
- * @return Return 0 if no errors, otherwise return the error number.
- */
-int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn)
-{
-	unsigned int i;
-	struct aim_ssi_item *cur, *parentgroup;
-
-	/* Make sure we actually need to clean out the list */
-	for (cur=sess->ssi.items, i=0; cur && !i; cur=cur->next)
-		/* Any buddies directly in the master group */
-		if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000))
-			i++;
-	if (!i)
-		return 0;
-
-	/* Remove all the additional data from all groups */
-	for (cur=sess->ssi.items; cur; cur=cur->next)
-		if ((cur->data) && (cur->type == AIM_SSI_TYPE_GROUP)) {
-			aim_freetlvchain((aim_tlvlist_t **)&cur->data);
-			cur->data = NULL;
-		}
-
-	/* If there are buddies directly in the master group, make sure  */
-	/* there is a group to put them in.  Any group, any group at all. */
-	for (cur=sess->ssi.items; ((cur) && ((cur->type != AIM_SSI_TYPE_BUDDY) || (cur->gid != 0x0000))); cur=cur->next);
-	if (!cur) {
-		for (parentgroup=sess->ssi.items; ((parentgroup) && (parentgroup->type!=AIM_SSI_TYPE_GROUP) && (parentgroup->gid==0x0000)); parentgroup=parentgroup->next);
-		if (!parentgroup) {
-			char *newgroup;
-			newgroup = (char*)g_malloc(strlen("Unknown")+1);
-			strcpy(newgroup, "Unknown");
-			aim_ssi_addgroups(sess, conn, &newgroup, 1);
-		}
-	}
-
-	/* Set parentgroup equal to any arbitray group */
-	for (parentgroup=sess->ssi.items; parentgroup->gid==0x0000 || parentgroup->type!=AIM_SSI_TYPE_GROUP; parentgroup=parentgroup->next);
-
-	/* If there are any buddies directly in the master group, put them in a real group */
-	for (cur=sess->ssi.items; cur; cur=cur->next)
-		if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000)) {
-			aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_DEL);
-			cur->gid = parentgroup->gid;
-			aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_ADD);
-		}
-
-	/* Rebuild additional data for all groups */
-	for (parentgroup=sess->ssi.items; parentgroup; parentgroup=parentgroup->next)
-		if (parentgroup->type == AIM_SSI_TYPE_GROUP)
-			aim_ssi_itemlist_rebuildgroup(&sess->ssi.items, parentgroup);
-
-	/* Send a mod snac for all groups */
-	i = 0;
-	for (cur=sess->ssi.items; cur; cur=cur->next)
-		if (cur->type == AIM_SSI_TYPE_GROUP)
-			i++;
-	if (i > 0) {
-		/* Allocate an array of pointers to each of the groups */
-		struct aim_ssi_item **groups;
-		if (!(groups = g_new0(struct aim_ssi_item *, i)))
-			return -ENOMEM;
-
-		for (cur=sess->ssi.items, i=0; cur; cur=cur->next)
-			if (cur->type == AIM_SSI_TYPE_GROUP)
-				groups[i] = cur;
-
-		aim_ssi_addmoddel(sess, conn, groups, i, AIM_CB_SSI_MOD);
-		g_free(groups);
-	}
-
-	/* Send a del snac for any empty groups */
-	i = 0;
-	for (cur=sess->ssi.items; cur; cur=cur->next)
-		if ((cur->type == AIM_SSI_TYPE_GROUP) && !(cur->data))
-			i++;
-	if (i > 0) {
-		/* Allocate an array of pointers to each of the groups */
-		struct aim_ssi_item **groups;
-		if (!(groups = g_new0(struct aim_ssi_item *, i)))
-			return -ENOMEM;
-
-		for (cur=sess->ssi.items, i=0; cur; cur=cur->next)
-			if ((cur->type == AIM_SSI_TYPE_GROUP) && !(cur->data))
-				groups[i] = cur;
-
-		aim_ssi_addmoddel(sess, conn, groups, i, AIM_CB_SSI_DEL);
-		g_free(groups);
-	}
-
-	/* Begin sending SSI SNACs */
-	aim_ssi_dispatch(sess, conn);
-
-	return 0;
-}
-
-/**
  * Add an array of screen names to the given group.
  *
@@ -999,55 +840,4 @@
 }
 
-/**
- * Stores your setting for whether you should show up as idle or not.
- *
- * @param sess The oscar session.
- * @param conn The bos connection for this session.
- * @param presence I think it's a bitmask, but I only know what one of the bits is:
- *        0x00000400 - Allow others to see your idle time
- * @return Return 0 if no errors, otherwise return the error number.
- */
-int aim_ssi_setpresence(aim_session_t *sess, aim_conn_t *conn, guint32 presence) {
-	struct aim_ssi_item *cur; //, *tmp;
-//	guint16 j;
-	aim_tlv_t *tlv;
-
-	if (!sess || !conn)
-		return -EINVAL;
-
-	/* Look up the item */
-	cur = aim_ssi_itemlist_finditem(sess->ssi.items, NULL, NULL, AIM_SSI_TYPE_PRESENCEPREFS);
-
-	if (cur) {
-		/* The item exists */
-		if (cur->data && (tlv = aim_gettlv(cur->data, 0x00c9, 1))) {
-			/* Just change the value of the x00c9 TLV */
-			if (tlv->length != 4) {
-				tlv->length = 4;
-				g_free(tlv->value);
-				tlv->value = (guint8 *)g_malloc(4*sizeof(guint8));
-			}
-			aimutil_put32(tlv->value, presence);
-		} else {
-			/* Need to add the x00c9 TLV to the TLV chain */
-			aim_addtlvtochain32((aim_tlvlist_t**)&cur->data, 0x00c9, presence);
-		}
-
-		/* Send the mod item SNAC */
-		aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_MOD);
-	} else {
-		/* Need to add the item */
-		if (!(cur = aim_ssi_itemlist_add(&sess->ssi.items, NULL, NULL, AIM_SSI_TYPE_PRESENCEPREFS)))
-			return -ENOMEM;
-		aim_addtlvtochain32((aim_tlvlist_t**)&cur->data, 0x00c9, presence);
-		aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_ADD);
-	}
-
-	/* Begin sending SSI SNACs */
-	aim_ssi_dispatch(sess, conn);
-
-	return 0;
-}
-
 /*
  * Request SSI Rights.
@@ -1070,35 +860,4 @@
 
 	return ret;
-}
-
-/*
- * Request SSI Data.
- *
- * The data will only be sent if it is newer than the posted local
- * timestamp and revision.
- * 
- * Note that the client should never increment the revision, only the server.
- * 
- */
-int aim_ssi_reqdata(aim_session_t *sess, aim_conn_t *conn, time_t localstamp, guint16 localrev)
-{
-	aim_frame_t *fr;
-	aim_snacid_t snacid;
-
-	if (!sess || !conn)
-		return -EINVAL;
-
-	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+4+2)))
-		return -ENOMEM;
-
-	snacid = aim_cachesnac(sess, AIM_CB_FAM_SSI, AIM_CB_SSI_REQLIST, 0x0000, NULL, 0);
-
-	aim_putsnac(&fr->data, AIM_CB_FAM_SSI, AIM_CB_SSI_REQLIST, 0x0000, snacid);
-	aimbs_put32(&fr->data, localstamp);
-	aimbs_put16(&fr->data, localrev);
-
-	aim_tx_enqueue(sess, fr);
-
-	return 0;
 }
 
Index: protocols/oscar/ssi.h
===================================================================
--- protocols/oscar/ssi.h	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/ssi.h	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -45,5 +45,4 @@
 /* These build the actual SNACs and queue them to be sent */
 int aim_ssi_reqrights(aim_session_t *sess, aim_conn_t *conn);
-int aim_ssi_reqdata(aim_session_t *sess, aim_conn_t *conn, time_t localstamp, guint16 localrev);
 int aim_ssi_reqalldata(aim_session_t *sess, aim_conn_t *conn);
 int aim_ssi_enable(aim_session_t *sess, aim_conn_t *conn);
@@ -57,8 +56,6 @@
 struct aim_ssi_item *aim_ssi_itemlist_findparent(struct aim_ssi_item *list, char *sn);
 int aim_ssi_getpermdeny(struct aim_ssi_item *list);
-guint32 aim_ssi_getpresence(struct aim_ssi_item *list);
 
 /* Send packets */
-int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn);
 int aim_ssi_addbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num, unsigned int flags);
 int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn);
@@ -69,7 +66,5 @@
 int aim_ssi_delmastergroup(aim_session_t *sess, aim_conn_t *conn);
 int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num);
-int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn);
 int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, guint16 type);
-int aim_ssi_setpresence(aim_session_t *sess, aim_conn_t *conn, guint32 presence);
 int aim_ssi_auth_request(aim_session_t *sess, aim_conn_t *conn, char *uin, char *reason);
 int aim_ssi_auth_reply(aim_session_t *sess, aim_conn_t *conn, char *uin, int yesno, char *reason);
Index: protocols/oscar/tlv.c
===================================================================
--- protocols/oscar/tlv.c	(revision 386042c08547bbe7f0b62ad97cdd8488cc13e97e)
+++ protocols/oscar/tlv.c	(revision 6042a54e827b36770e8989d9a8ba49a66ec6f846)
@@ -223,37 +223,4 @@
 
 /**
- * aim_addtlvtochain_availmsg - Add a ICQ availability message to a TLV chain
- * @list: Destination chain
- * @type: TLV type to add
- * @val: Value to add
- *
- * Adds a available message to a TLV chain
- *
- */
-int aim_addtlvtochain_availmsg(aim_tlvlist_t **list, const guint16 t, const char *msg)
-{
-	int ret;
-	guint16 unknown_data = 0x00;
-	guint8 add_data_len = 4;
-	guint16 msg_len = strlen(msg);
-	guint8 total_len = strlen(msg) + add_data_len;
-	guint8 *data, *cur;
-	guint8 alloc_len = msg_len + (3*sizeof(guint16)) + (2*sizeof(guint8));
-	data = cur = g_malloc(alloc_len);
-	
-	cur += aimutil_put16(cur, 2);
-	cur += aimutil_put8(cur, add_data_len);
-	cur += aimutil_put8(cur, total_len);
-	cur += aimutil_put16(cur, msg_len);
-	cur += aimutil_putstr(cur, msg, msg_len);
-	cur += aimutil_put16(cur, unknown_data);
-
-	ret = aim_addtlvtochain_raw(list, t, alloc_len, data);
-	g_free(data);
-
-	return ret;
-}
-
-/**
  * aim_addtlvtochain_caps - Add a capability block to a TLV chain
  * @list: Destination chain
@@ -278,16 +245,4 @@
 
 	return aim_addtlvtochain_raw(list, t, aim_bstream_curpos(&bs), buf);
-}
-
-int aim_addtlvtochain_userinfo(aim_tlvlist_t **list, guint16 type, aim_userinfo_t *ui)
-{
-	guint8 buf[1024]; /* bleh */
-	aim_bstream_t bs;
-
-	aim_bstream_init(&bs, buf, sizeof(buf));
-
-	aim_putuserinfo(&bs, ui);
-
-	return aim_addtlvtochain_raw(list, type, aim_bstream_curpos(&bs), buf);
 }
 
