| 68 aim_tx_enqueue(sess, fr); |
68 aim_tx_enqueue(sess, fr); |
| 69 |
69 |
| 70 return 0; |
70 return 0; |
| 71 } |
71 } |
| 72 |
72 |
| 73 faim_export int aim_icq_hideip(aim_session_t *sess) |
73 /** |
| |
74 * Set your ICQ security. |
| |
75 * |
| |
76 * @param sess The oscar session. |
| |
77 * @param auth Ask authorization when a buddy adds us? |
| |
78 * @param web Show our presence on the ICQ web site. |
| |
79 * @param hide Hide our IP address. |
| |
80 * @return Return 0 if no errors, otherwise return the error number. |
| |
81 */ |
| |
82 faim_export int aim_icq_setsecurity(aim_session_t *sess, const int auth, const int web, const int hide) |
| 74 { |
83 { |
| 75 aim_conn_t *conn; |
84 aim_conn_t *conn; |
| 76 aim_frame_t *fr; |
85 aim_frame_t *fr; |
| 77 aim_snacid_t snacid; |
86 aim_snacid_t snacid; |
| 78 int bslen; |
87 int bslen; |
| 95 aimbs_putle16(&fr->data, bslen - 2); |
104 aimbs_putle16(&fr->data, bslen - 2); |
| 96 aimbs_putle32(&fr->data, atoi(sess->sn)); |
105 aimbs_putle32(&fr->data, atoi(sess->sn)); |
| 97 aimbs_putle16(&fr->data, 0x07d0); /* I command thee. */ |
106 aimbs_putle16(&fr->data, 0x07d0); /* I command thee. */ |
| 98 aimbs_putle16(&fr->data, snacid); /* eh. */ |
107 aimbs_putle16(&fr->data, snacid); /* eh. */ |
| 99 aimbs_putle16(&fr->data, 0x0424); /* shrug. */ |
108 aimbs_putle16(&fr->data, 0x0424); /* shrug. */ |
| 100 aimbs_putle16(&fr->data, 0x0001); |
109 aimbs_putle8(&fr->data, (auth == TRUE) ? 0x00 : 0x01); |
| 101 aimbs_putle16(&fr->data, 0x0001); |
110 aimbs_putle8(&fr->data, (web == TRUE) ? 0x00 : 0x01); |
| 102 |
111 aimbs_putle8(&fr->data, (hide == TRUE) ? 0x00 : 0x01); |
| 103 aim_tx_enqueue(sess, fr); |
112 aimbs_putle8(&fr->data, 0x00); |
| 104 |
113 |
| 105 return 0; |
114 aim_tx_enqueue(sess, fr); |
| 106 } |
115 |
| 107 |
116 return 0; |
| |
117 } |
| |
118 |
| |
119 /** |
| |
120 * I don't know why we have this function and the one above... |
| |
121 * Maybe one of them is wrong? Maybe they both really DO exist? |
| |
122 */ |
| 108 faim_export int aim_icq_setauthsetting(aim_session_t *sess, int auth_required) |
123 faim_export int aim_icq_setauthsetting(aim_session_t *sess, int auth_required) |
| 109 { |
124 { |
| 110 aim_conn_t *conn; |
125 aim_conn_t *conn; |
| 111 aim_frame_t *fr; |
126 aim_frame_t *fr; |
| 112 aim_snacid_t snacid; |
127 aim_snacid_t snacid; |