Mercurial > pidgin.yaz
diff src/protocols/oscar/admin.c @ 2979:8e924e4aa256
[gaim-migrate @ 2992]
I'll never tell...
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Sat, 23 Feb 2002 22:50:44 +0000 |
parents | 441b84ab7f4e |
children | e73c48cf1645 |
line wrap: on
line diff
--- a/src/protocols/oscar/admin.c Sat Feb 23 04:29:48 2002 +0000 +++ b/src/protocols/oscar/admin.c Sat Feb 23 22:50:44 2002 +0000 @@ -173,3 +173,25 @@ return 0; } +faim_export int aim_admin_setnick(aim_session_t *sess, aim_conn_t *conn, const char *newnick) +{ + aim_frame_t *tx; + aim_snacid_t snacid; + aim_tlvlist_t *tl = NULL; + + if (!(tx = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2+2+strlen(newnick)))) + return -ENOMEM; + + snacid = aim_cachesnac(sess, 0x0007, 0x0004, 0x0000, NULL, 0); + aim_putsnac(&tx->data, 0x0007, 0x0004, 0x0000, snacid); + + aim_addtlvtochain_raw(&tl, 0x0001, strlen(newnick), newnick); + + aim_writetlvchain(&tx->data, &tl); + aim_freetlvchain(&tl); + + aim_tx_enqueue(sess, tx); + + + return 0; +}