diff src/protocols/oscar/icq.c @ 10570:2b05acfeec65

[gaim-migrate @ 11960] sf patch #1036930, from Ettore Simone with updates from Stu Tomlinson Add support for setting the ICQ web presence, authorization and IP hiding preferences. I know the authorization setting works. The IP hiding preference didn't seem to have any affect on licq. And the web aware setting made something different happen, but I still didn't seem to be web aware. I think there might be another setting that needs setting. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 04 Feb 2005 04:50:08 +0000
parents 33746d45bd0d
children de34037a02c7
line wrap: on
line diff
--- a/src/protocols/oscar/icq.c	Thu Feb 03 22:36:56 2005 +0000
+++ b/src/protocols/oscar/icq.c	Fri Feb 04 04:50:08 2005 +0000
@@ -70,7 +70,16 @@
 	return 0;
 }
 
-faim_export int aim_icq_hideip(aim_session_t *sess)
+/**
+ * Set your ICQ security.
+ *
+ * @param sess The oscar session.
+ * @param auth Ask authorization when a buddy adds us?
+ * @param web  Show our presence on the ICQ web site.
+ * @param hide Hide our IP address.
+ * @return Return 0 if no errors, otherwise return the error number.
+ */
+faim_export int aim_icq_setsecurity(aim_session_t *sess, const int auth, const int web, const int hide)
 {
 	aim_conn_t *conn;
 	aim_frame_t *fr;
@@ -97,14 +106,20 @@
 	aimbs_putle16(&fr->data, 0x07d0); /* I command thee. */
 	aimbs_putle16(&fr->data, snacid); /* eh. */
 	aimbs_putle16(&fr->data, 0x0424); /* shrug. */
-	aimbs_putle16(&fr->data, 0x0001);
-	aimbs_putle16(&fr->data, 0x0001);
+	aimbs_putle8(&fr->data, (auth == TRUE) ? 0x00 : 0x01);
+	aimbs_putle8(&fr->data, (web  == TRUE) ? 0x00 : 0x01);
+	aimbs_putle8(&fr->data, (hide == TRUE) ? 0x00 : 0x01);
+	aimbs_putle8(&fr->data, 0x00);
 
 	aim_tx_enqueue(sess, fr);
 
 	return 0;
 }
 
+/**
+ * I don't know why we have this function and the one above...
+ * Maybe one of them is wrong?  Maybe they both really DO exist?
+ */
 faim_export int aim_icq_setauthsetting(aim_session_t *sess, int auth_required)
 {
 	aim_conn_t *conn;