Mercurial > pidgin.yaz
diff libfaim/aim_misc.c @ 771:72e556f6b99d
[gaim-migrate @ 781]
libfaim gets warnings, and other minor changes
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 28 Aug 2000 05:07:43 +0000 |
parents | e4c34ca88d9b |
children | 9a123b171f46 |
line wrap: on
line diff
--- a/libfaim/aim_misc.c Fri Aug 25 22:09:34 2000 +0000 +++ b/libfaim/aim_misc.c Mon Aug 28 05:07:43 2000 +0000 @@ -250,7 +250,11 @@ /* * aim_bos_setgroupperm(mask) * - * Set group permisson mask. Normally 0x1f. + * Set group permisson mask. Normally 0x1f (all classes). + * + * The group permission mask allows you to keep users of a certain + * class or classes from talking to you. The mask should be + * a bitwise OR of all the user classes you want to see you. * */ u_long aim_bos_setgroupperm(struct aim_session_t *sess, @@ -336,12 +340,8 @@ } /* - * send_login_phase3(int socket) - * * Request Rate Information. * - * TODO: Move to aim_conn. - * TODO: Move to SNAC interface. */ u_long aim_bos_reqrate(struct aim_session_t *sess, struct aim_conn_t *conn) @@ -350,8 +350,6 @@ } /* - * send_login_phase3b(int socket) - * * Rate Information Response Acknowledge. * */ @@ -389,7 +387,7 @@ * Sets privacy flags. Normally 0x03. * * Bit 1: Allows other AIM users to see how long you've been idle. - * + * Bit 2: Allows other AIM users to see how long you've been a member. * */ u_long aim_bos_setprivacyflags(struct aim_session_t *sess, @@ -503,10 +501,7 @@ * aim_bos_nop() * * No-op. WinAIM sends these every 4min or so to keep - * the connection alive. With the recent changes - * in the OSCAR servers, it looks like we must do the - * same or be disconnected with a mysterious 'you logged - * on from another client' message. + * the connection alive. Its not real necessary. * */ u_long aim_bos_nop(struct aim_session_t *sess, @@ -540,6 +535,46 @@ } /* + * aim_send_warning(struct aim_session_t *sess, + * struct aim_conn_t *conn, char *destsn, int anon) + * send a warning to destsn. + * anon is anonymous or not; + * AIM_WARN_ANON anonymous + * + * returns -1 on error (couldn't alloc packet), next snacid on success. + * + */ +int aim_send_warning(struct aim_session_t *sess, struct aim_conn_t *conn, char *destsn, int anon) +{ + struct command_tx_struct *newpacket; + int curbyte; + + if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, strlen(destsn)+13))) + return -1; + + newpacket->lock = 1; + + curbyte = 0; + curbyte += aim_putsnac(newpacket->data+curbyte, + 0x0004, 0x0008, 0x0000, sess->snac_nextid); + + curbyte += aimutil_put16(newpacket->data+curbyte, (anon & AIM_WARN_ANON)?1:0); + + curbyte += aimutil_put8(newpacket->data+curbyte, strlen(destsn)); + + curbyte += aimutil_putstr(newpacket->data+curbyte, destsn, strlen(destsn)); + + newpacket->commandlen = curbyte; + newpacket->lock = 0; + + aim_tx_enqueue(sess, newpacket); + + return (sess->snac_nextid++); +} + + + +/* * aim_debugconn_sendconnect() * * For aimdebugd. If you don't know what it is, you don't want to.