* But they get it to compile.
*/
#define faim_mutex_t char
-#define faim_mutex_init(x, y) *x = 0
+#define faim_mutex_init(x) *x = 0
#define faim_mutex_lock(x) *x = 1;
#define faim_mutex_unlock(x) *x = 0;
#define faim_mutex_destroy(x) *x = 0;
* for WinAIM clients (up through the latest (4.0.1957)) to
* send any more than 1kb. Amaze all your windows friends
* with utterly oversized instant messages!
+ *
+ * XXX: the real limit is the total SNAC size at 8192. Fix this.
*
*/
#define MAXMSGLEN 7987
*/
#define AIM_COOKIELEN 0x100
+#define AIM_MD5_STRING "AOL Instant Messenger (SM)"
+
#if debug > 0
#define faimdprintf(l, x...) {if (l >= debug) printf(x); }
#else
u_short capabilities;
};
-#define AIM_CLASS_TRIAL 0x0001
-#define AIM_CLASS_UNKNOWN2 0x0002
+#define AIM_CLASS_TRIAL 0x0001 /* "damned transients" */
+#define AIM_CLASS_ADMINISTRATOR 0x0002
#define AIM_CLASS_AOL 0x0004
-#define AIM_CLASS_UNKNOWN4 0x0008
+#define AIM_CLASS_OSCAR_PAY 0x0008
#define AIM_CLASS_FREE 0x0010
#define AIM_CLASS_AWAY 0x0020
#define AIM_CLASS_UNKNOWN40 0x0040
#define AIM_CLASS_UNKNOWN80 0x0080
+#define AIM_CLASS_ALLUSERS 0x001f
+
/*
* TLV handling
*/
/* aim_login.c */
int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn);
int aim_request_login (struct aim_session_t *sess, struct aim_conn_t *conn, char *sn);
-int aim_send_login (struct aim_session_t *, struct aim_conn_t *, char *, char *, struct client_info_s *);
-int aim_encode_password(const char *, u_char *);
-int aimicq_encode_password(const char *password, u_char *encoded);
+int aim_send_login (struct aim_session_t *, struct aim_conn_t *, char *, char *, struct client_info_s *, char *key);
unsigned long aim_sendauthresp(struct aim_session_t *sess,
struct aim_conn_t *conn,
char *sn, char *bosip,
int regstatus);
int aim_gencookie(unsigned char *buf);
int aim_sendserverready(struct aim_session_t *sess, struct aim_conn_t *conn);
+int aim_authkeyparse(struct aim_session_t *sess, struct command_rx_struct *command);
unsigned long aim_sendredirect(struct aim_session_t *sess,
struct aim_conn_t *conn,
unsigned short servid,
#define AIM_VISIBILITYCHANGE_DENYADD 0x07
#define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08
+#define AIM_PRIVFLAGS_ALLOWIDLE 0x01
+#define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02
+
+#define AIM_WARN_ANON 0x01
+
+int aim_send_warning(struct aim_session_t *sess, struct aim_conn_t *conn, char *destsn, int anon);
u_long aim_bos_nop(struct aim_session_t *, struct aim_conn_t *);
u_long aim_bos_setidle(struct aim_session_t *, struct aim_conn_t *, u_long);
u_long aim_bos_changevisibility(struct aim_session_t *, struct aim_conn_t *, int, char *);
int aim_parse_generalerrs(struct aim_session_t *, struct command_rx_struct *command, ...);
int aim_parsemotd_middle(struct aim_session_t *sess, struct command_rx_struct *command, ...);
int aim_parse_ratechange_middle(struct aim_session_t *sess, struct command_rx_struct *command);
+int aim_parse_evilnotify_middle(struct aim_session_t *sess, struct command_rx_struct *command);
int aim_parse_msgack_middle(struct aim_session_t *sess, struct command_rx_struct *command);
/* aim_im.c */
int aim_parse_msgerror_middle(struct aim_session_t *, struct command_rx_struct *);
int aim_negchan_middle(struct aim_session_t *sess, struct command_rx_struct *command);
-struct aim_conn_t * aim_directim_intiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *);
+struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *);
int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *);
struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *);