comparison src/protocols/oscar/ssi.c @ 4269:ff0642fab1d5

[gaim-migrate @ 4520] Our cable was out again, so I was left doing dull stuff. I changed the alias_buddy prpl function so that it takes the alias as well as just the buddy name. It seemed silly not to pass the alias to a function that changes the alias. I added a call back for this prpl function in oscar.c. This has the effect of, when you add/change/remove the alias of a buddy, it also changes the alias in the server list. I changed some normalize calls in oscar.c because I think it's better this way. I could be wrong. I added the ability to re-request authorization from contacts that have not authorized you yet. Just right-click on those mofo's. I shuffled some functions around. oscar.c is a little messy. Our cable was out some today. Here's the message they have when you call their customer support: "All high speed data customers in the 919 and 252 area code may experience flashing status lights on their cable modems with inability to access online services at this time." 919 is basically all of Raleigh. I'm going to estimate at least 10,000 people with Time Warner cable. That's a lot of people. Time Warner sucks. This is from a few hours today: "15566 packets transmitted, 598 packets received, +8 duplicates, 96% packet loss" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 09 Jan 2003 21:21:00 +0000
parents ea8fb193f5a0
children aa20cc16dc08
comparison
equal deleted inserted replaced
4268:69d38d5d06dd 4269:ff0642fab1d5
883 */ 883 */
884 faim_export int aim_ssi_movebuddy(aim_session_t *sess, aim_conn_t *conn, const char *oldgn, const char *newgn, const char *sn) 884 faim_export int aim_ssi_movebuddy(aim_session_t *sess, aim_conn_t *conn, const char *oldgn, const char *newgn, const char *sn)
885 { 885 {
886 aim_ssi_addbuddy(sess, conn, sn, newgn, aim_ssi_getalias(sess->ssi.local, oldgn, sn), NULL, NULL, aim_ssi_waitingforauth(sess->ssi.local, oldgn, sn)); 886 aim_ssi_addbuddy(sess, conn, sn, newgn, aim_ssi_getalias(sess->ssi.local, oldgn, sn), NULL, NULL, aim_ssi_waitingforauth(sess->ssi.local, oldgn, sn));
887 aim_ssi_delbuddy(sess, conn, sn, oldgn); 887 aim_ssi_delbuddy(sess, conn, sn, oldgn);
888 return 0;
889 }
890
891 /**
892 * Change the alias stored on the server for a given buddy.
893 *
894 * @param sess The oscar session.
895 * @param conn The bos connection for this session.
896 * @param gn The group that the buddy is currently in.
897 * @param sn The screen name of the buddy.
898 * @param alias The new alias for the buddy.
899 * @return Return 0 if no errors, otherwise return the error number.
900 */
901 faim_export int aim_ssi_aliasbuddy(aim_session_t *sess, aim_conn_t *conn, const char *gn, const char *sn, const char *alias)
902 {
903 struct aim_ssi_item *tmp;
904 aim_tlvlist_t *data = NULL;
905
906 if (!sess || !conn || !gn || !sn)
907 return -EINVAL;
908
909 if (!(tmp = aim_ssi_itemlist_finditem(sess->ssi.local, gn, sn, AIM_SSI_TYPE_BUDDY)))
910 return -EINVAL;
911
912 if (alias && !strlen(alias))
913 alias = NULL;
914
915 /* Need to add the x0131 TLV to the TLV chain */
916 if (alias)
917 aim_addtlvtochain_raw(&data, 0x0131, strlen(alias), alias);
918
919 aim_freetlvchain(&tmp->data);
920 tmp->data = data;
921
922 /* Sync our local list with the server list */
923 aim_ssi_sync(sess, conn);
924
888 return 0; 925 return 0;
889 } 926 }
890 927
891 /** 928 /**
892 * Rename a group. 929 * Rename a group.