From 5c09a593072914336dcec3e8e92b28a1d4f03fa0 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 16 Nov 2005 00:16:39 +0100 Subject: Got rid of raw ^B's in source, Replaced most irc_usermsg() calls in nogaim.c with serv_got_crap(), Slightly clearer handling of buddy add requests. Thanks to timing for the patch. --- protocols/jabber/jabber.c | 2 +- protocols/msn/msn_util.c | 2 +- protocols/nogaim.c | 42 +++++++++++++++++++++--------------------- 3 files changed, 23 insertions(+), 23 deletions(-) (limited to 'protocols') diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index a724bdcd..ee43cff8 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -1127,7 +1127,7 @@ static void jabber_handles10n(gjconn gjc, jpacket p) * A "subscribe to us" request was received - put up the approval dialog */ struct jabber_add_permit *jap = g_new0(struct jabber_add_permit, 1); - gchar *msg = g_strdup_printf(_("The user %s wants to add you to their buddy list."), + gchar *msg = g_strdup_printf(_("The user %s wants to add you to his/her buddy list."), Jid); jap->gjc = gjc; diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index 2f22acfc..e5f0b2c9 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -165,7 +165,7 @@ void msn_buddy_ask( struct gaim_connection *gc, char *handle, char *realname ) bla->realname = g_strdup( realname ); g_snprintf( buf, sizeof( buf ), - "The user %s (%s) wants to add you to his/her buddy list. Do you want to allow this?", + "The user %s (%s) wants to add you to his/her buddy list.", handle, realname ); do_ask_dialog( gc, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no ); } diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 65fc5a98..123eb477 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -121,7 +121,7 @@ int proto_away( struct gaim_connection *gc, char *away ) { gc->prpl->set_away( gc, s, away ); if( set_getint( gc->irc, "debug" ) ) - irc_usermsg( gc->irc, "Setting away state for %s to %s", proto_name[gc->protocol], s ); + serv_got_crap( gc, "Setting away state to %s", s ); } else gc->prpl->set_away( gc, GAIM_AWAY_CUSTOM, away ); @@ -215,19 +215,19 @@ void destroy_gaim_conn( struct gaim_connection *gc ) void set_login_progress( struct gaim_connection *gc, int step, char *msg ) { - irc_usermsg( gc->irc, "%s(%s) - Logging in: %s", proto_name[gc->protocol], gc->username, msg ); + serv_got_crap( gc, "Logging in: %s", msg ); } /* Errors *while* logging in */ void hide_login_progress( struct gaim_connection *gc, char *msg ) { - irc_usermsg( gc->irc, "%s(%s) - Login error: %s", proto_name[gc->protocol], gc->username, msg ); + serv_got_crap( gc, "Login error: %s", msg ); } /* Errors *after* logging in */ void hide_login_progress_error( struct gaim_connection *gc, char *msg ) { - irc_usermsg( gc->irc, "%s(%s) - Logged out: %s", proto_name[gc->protocol], gc->username, msg ); + serv_got_crap( gc, "Logged out: %s", msg ); } void serv_got_crap( struct gaim_connection *gc, char *format, ... ) @@ -275,7 +275,7 @@ void account_online( struct gaim_connection *gc ) u = user_find( gc->irc, gc->irc->nick ); - irc_usermsg( gc->irc, "%s(%s) - Logged in", proto_name[gc->protocol], gc->username ); + serv_got_crap( gc, "Logged in" ); gc->keepalive = g_timeout_add( 60000, send_keepalive, gc ); gc->flags |= OPT_LOGGED_IN; @@ -289,7 +289,7 @@ void account_online( struct gaim_connection *gc ) break; if( u == NULL ) - irc_usermsg( gc->irc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. " + serv_got_crap( gc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. " "See \x02""help import_buddies\x02"" for more information." ); } } @@ -322,7 +322,7 @@ void signoff( struct gaim_connection *gc ) user_t *t, *u = irc->users; account_t *a; - irc_usermsg( gc->irc, "%s(%s) - Signing off..", proto_name[gc->protocol], gc->username ); + serv_got_crap( gc, "Signing off.." ); gaim_input_remove( gc->keepalive ); gc->keepalive = 0; @@ -354,7 +354,7 @@ void signoff( struct gaim_connection *gc ) else if( !gc->wants_to_die && set_getint( irc, "auto_reconnect" ) ) { int delay = set_getint( irc, "auto_reconnect_delay" ); - irc_usermsg( gc->irc, "%s(%s) - Reconnecting in %d seconds..", proto_name[gc->protocol], gc->username, delay); + serv_got_crap( gc, "Reconnecting in %d seconds..", delay ); a->reconnect = 1; g_timeout_add( delay * 1000, auto_reconnect, a ); @@ -368,7 +368,7 @@ void signoff( struct gaim_connection *gc ) void do_error_dialog( struct gaim_connection *gc, char *msg, char *title ) { - irc_usermsg( gc->irc, "%s(%s) - Error: %s", proto_name[gc->protocol], gc->username, msg ); + serv_got_crap( gc, "Error: %s", msg ); } void do_ask_dialog( struct gaim_connection *gc, char *msg, void *data, void *doit, void *dont ) @@ -397,12 +397,12 @@ void add_buddy( struct gaim_connection *gc, char *group, char *handle, char *rea irc_t *irc = gc->irc; if( set_getint( irc, "debug" ) && 0 ) /* This message is too useless */ - irc_usermsg( irc, "Receiving user add from protocol: %s", handle ); + serv_got_crap( gc, "Receiving user add from handle: %s", handle ); if( user_findhandle( gc, handle ) ) { if( set_getint( irc, "debug" ) ) - irc_usermsg( irc, "User already exists, ignoring add request: %s", handle ); + serv_got_crap( gc, "User already exists, ignoring add request: %s", handle ); return; @@ -495,7 +495,7 @@ void serv_buddy_rename( struct gaim_connection *gc, char *handle, char *realname u->realname = g_strdup( name ); if( ( gc->flags & OPT_LOGGED_IN ) && set_getint( gc->irc, "display_namechanges" ) ) - irc_usermsg( gc->irc, "User `%s' changed name to `%s'", u->nick, u->realname ); + serv_got_crap( gc, "User `%s' changed name to `%s'", u->nick, u->realname ); } } @@ -528,8 +528,8 @@ void serv_got_update( struct gaim_connection *gc, char *handle, int loggedin, in { if( set_getint( gc->irc, "debug" ) || g_strcasecmp( set_getstr( gc->irc, "handle_unknown" ), "ignore" ) != 0 ) { - irc_usermsg( gc->irc, "serv_got_update() for handle %s on connection %s(%s):", handle, proto_name[gc->protocol], gc->username ); - irc_usermsg( gc->irc, "loggedin = %d, type = %d", loggedin, type ); + serv_got_crap( gc, "serv_got_update() for handle %s:", handle ); + serv_got_crap( gc, "loggedin = %d, type = %d", loggedin, type ); } return; @@ -609,7 +609,7 @@ void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 f if( g_strcasecmp( h, "ignore" ) == 0 ) { if( set_getint( irc, "debug" ) ) - irc_usermsg( irc, "Ignoring message from unknown handle %s on connection %s(%s)", handle, proto_name[gc->protocol], gc->username ); + serv_got_crap( gc, "Ignoring message from unknown handle %s", handle ); return; } @@ -631,7 +631,7 @@ void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 f } else { - irc_usermsg( irc, "Message from unknown handle %s on connection %s(%s):", handle, proto_name[gc->protocol], gc->username ); + serv_got_crap( gc, "Message from unknown handle %s:", handle ); u = user_find( irc, irc->mynick ); } } @@ -691,7 +691,7 @@ void serv_got_chat_left( struct gaim_connection *gc, int id ) GList *ir; if( set_getint( gc->irc, "debug" ) ) - irc_usermsg( gc->irc, "You were removed from conversation %d", (int) id ); + serv_got_crap( gc, "You were removed from conversation %d", (int) id ); for( c = gc->conversations; c && c->id != id; c = (l=c)->next ); @@ -747,7 +747,7 @@ void serv_got_chat_in( struct gaim_connection *gc, int id, char *who, int whispe if( c && u ) irc_privmsg( gc->irc, u, "PRIVMSG", c->channel, "", msg ); else - irc_usermsg( gc->irc, "Message from/to conversation %s@%d (unknown conv/user): %s", who, id, msg ); + serv_got_crap( gc, "Message from/to conversation %s@%d (unknown conv/user): %s", who, id, msg ); } struct conversation *serv_got_joined_chat( struct gaim_connection *gc, int id, char *handle ) @@ -775,7 +775,7 @@ struct conversation *serv_got_joined_chat( struct gaim_connection *gc, int id, c g_free( s ); if( set_getint( gc->irc, "debug" ) ) - irc_usermsg( gc->irc, "Creating new conversation: (id=%d,handle=%s)", id, handle ); + serv_got_crap( gc, "Creating new conversation: (id=%d,handle=%s)", id, handle ); return( c ); } @@ -794,7 +794,7 @@ void add_chat_buddy( struct conversation *b, char *handle ) int me = 0; if( set_getint( b->gc->irc, "debug" ) ) - irc_usermsg( b->gc->irc, "User %s added to conversation %d", handle, b->id ); + serv_got_crap( b->gc, "User %s added to conversation %d", handle, b->id ); /* It might be yourself! */ if( b->gc->prpl->cmp_buddynames( handle, b->gc->user->username ) == 0 ) @@ -828,7 +828,7 @@ void remove_chat_buddy( struct conversation *b, char *handle, char *reason ) int me = 0; if( set_getint( b->gc->irc, "debug" ) ) - irc_usermsg( b->gc->irc, "User %s removed from conversation %d (%s)", handle, b->id, reason ? reason : "" ); + serv_got_crap( b->gc, "User %s removed from conversation %d (%s)", handle, b->id, reason ? reason : "" ); /* It might be yourself! */ if( g_strcasecmp( handle, b->gc->user->username ) == 0 ) -- cgit v1.2.3 From bb556db516af064649588a771048b004852e4f49 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 16 Nov 2005 01:41:25 +0100 Subject: Hmmm, why are these 0-byte files still there? --- protocols/jabber/genhash.c | 0 protocols/jabber/jconn.c | 0 protocols/jabber/karma.c | 0 protocols/jabber/pproxy.c | 0 protocols/jabber/rate.c | 0 protocols/jabber/xhash.c | 0 protocols/jabber/xstream.c | 0 protocols/oscar/aim_cbtypes.h | 0 8 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 protocols/jabber/genhash.c delete mode 100644 protocols/jabber/jconn.c delete mode 100644 protocols/jabber/karma.c delete mode 100644 protocols/jabber/pproxy.c delete mode 100644 protocols/jabber/rate.c delete mode 100644 protocols/jabber/xhash.c delete mode 100644 protocols/jabber/xstream.c delete mode 100644 protocols/oscar/aim_cbtypes.h (limited to 'protocols') diff --git a/protocols/jabber/genhash.c b/protocols/jabber/genhash.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/jabber/jconn.c b/protocols/jabber/jconn.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/jabber/karma.c b/protocols/jabber/karma.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/jabber/pproxy.c b/protocols/jabber/pproxy.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/jabber/rate.c b/protocols/jabber/rate.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/jabber/xhash.c b/protocols/jabber/xhash.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/jabber/xstream.c b/protocols/jabber/xstream.c deleted file mode 100644 index e69de29b..00000000 diff --git a/protocols/oscar/aim_cbtypes.h b/protocols/oscar/aim_cbtypes.h deleted file mode 100644 index e69de29b..00000000 -- cgit v1.2.3 From c572dd67167c0365a5bf62899c31efd4f223acaa Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 18 Nov 2005 13:41:58 +0100 Subject: HTML stripping is optional again (but still safer than before 0.93), but now enabled by default. --- protocols/nogaim.c | 25 +++++++++++++++---------- protocols/util.c | 2 -- protocols/yahoo/yahoo.c | 4 ---- 3 files changed, 15 insertions(+), 16 deletions(-) (limited to 'protocols') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 123eb477..f4a2ecb3 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -246,8 +246,8 @@ void serv_got_crap( struct gaim_connection *gc, char *format, ... ) else msg = text; - /* if( g_strcasecmp( set_getstr(gc->irc, "html" ), "strip" ) == 0 ) */ - if( gc->flags & OPT_CONN_HTML ) + if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || + ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) strip_html( msg ); irc_usermsg( gc->irc, "%s(%s) - %s", proto_name[gc->protocol], gc->username, msg ); @@ -636,8 +636,8 @@ void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 f } } - /* if( g_strcasecmp( set_getstr( irc, "html" ), "strip" ) == 0 ) */ - if( gc->flags & OPT_CONN_HTML ) + if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || + ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) strip_html( msg ); if( g_strncasecmp( set_getstr( irc, "charset" ), "none", 4 ) != 0 && @@ -736,8 +736,8 @@ void serv_got_chat_in( struct gaim_connection *gc, int id, char *who, int whispe u = user_findhandle( gc, who ); for( c = gc->conversations; c && c->id != id; c = c->next ); - /* if( g_strcasecmp( set_getstr( gc->irc, "html" ), "strip" ) == 0 ) */ - if( gc->flags & OPT_CONN_HTML ) + if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || + ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) strip_html( msg ); if( g_strncasecmp( set_getstr( gc->irc, "charset" ), "none", 4 ) != 0 && @@ -969,10 +969,15 @@ int serv_send_im( irc_t *irc, user_t *u, char *msg, int flags ) do_iconv( set_getstr( irc, "charset" ), "UTF-8", msg, buf, 0, 8192 ) != -1 ) msg = buf; - if( u->gc->flags & OPT_CONN_HTML) { - char * html = escape_html(msg); - strncpy(buf, html, 8192); - g_free(html); + if( ( u->gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "", 6 ) != 0 ) ) + { + char *html; + + html = escape_html( msg ); + strncpy( buf, html, 8192 ); + g_free( html ); + + msg = buf; } return( ((struct gaim_connection *)u->gc)->prpl->send_im( u->gc, u->handle, msg, strlen( msg ), flags ) ); diff --git a/protocols/util.c b/protocols/util.c index 073ee36d..6a2f2e46 100644 --- a/protocols/util.c +++ b/protocols/util.c @@ -376,8 +376,6 @@ char *escape_html( const char *html ) if( html == NULL ) return( NULL ); - if( g_strncasecmp( html, "", 6 ) == 0 ) - return( g_strdup( html ) ); ret = g_string_new( "" ); diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 8344fbf2..d7f7d1dc 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -850,8 +850,6 @@ void ext_yahoo_conf_userjoin( int id, char *who, char *room ) if( c ) add_chat_buddy( c, who ); - else if( set_getint( gc->irc, "debug" ) ) - serv_got_crap( gc, "Got ext_yahoo_conf_userjoin() from %s for unknown conference %s", who, room ); } void ext_yahoo_conf_userleave( int id, char *who, char *room ) @@ -863,8 +861,6 @@ void ext_yahoo_conf_userleave( int id, char *who, char *room ) if( c ) remove_chat_buddy( c, who, "" ); - else if( set_getint( gc->irc, "debug" ) ) - serv_got_crap( gc, "Got ext_yahoo_conf_userleave() from %s for unknown conference %s", who, room ); } void ext_yahoo_conf_message( int id, char *who, char *room, char *msg, int utf8 ) -- cgit v1.2.3 From 3e1de874e95dae74e970c1c574cf64bda28e04f7 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 19 Nov 2005 12:12:18 +0100 Subject: Applied AIM typing notification patch from Hanji. --- protocols/oscar/im.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ protocols/oscar/im.h | 2 ++ protocols/oscar/oscar.c | 31 +++++++++++++++++- 3 files changed, 118 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/oscar/im.c b/protocols/oscar/im.c index 99661846..4ceb0716 100644 --- a/protocols/oscar/im.c +++ b/protocols/oscar/im.c @@ -1995,6 +1995,90 @@ static int msgack(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_m return ret; } +/* + * Subtype 0x0014 - Send a mini typing notification (mtn) packet. + * + * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer, + * and Gaim 0.60 and newer. + * + */ +int aim_im_sendmtn(aim_session_t *sess, guint16 type1, const char *sn, guint16 type2) +{ + aim_conn_t *conn; + aim_frame_t *fr; + aim_snacid_t snacid; + + if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0002))) + return -EINVAL; + + if (!sn) + return -EINVAL; + + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+11+strlen(sn)+2))) + return -ENOMEM; + + snacid = aim_cachesnac(sess, 0x0004, 0x0014, 0x0000, NULL, 0); + aim_putsnac(&fr->data, 0x0004, 0x0014, 0x0000, snacid); + + /* + * 8 days of light + * Er, that is to say, 8 bytes of 0's + */ + aimbs_put16(&fr->data, 0x0000); + aimbs_put16(&fr->data, 0x0000); + aimbs_put16(&fr->data, 0x0000); + aimbs_put16(&fr->data, 0x0000); + + /* + * Type 1 (should be 0x0001 for mtn) + */ + aimbs_put16(&fr->data, type1); + + /* + * Dest sn + */ + aimbs_put8(&fr->data, strlen(sn)); + aimbs_putraw(&fr->data, sn, strlen(sn)); + + /* + * Type 2 (should be 0x0000, 0x0001, or 0x0002 for mtn) + */ + aimbs_put16(&fr->data, type2); + + aim_tx_enqueue(sess, fr); + + return 0; +} + +/* + * Subtype 0x0014 - Receive a mini typing notification (mtn) packet. + * + * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer, + * and Gaim 0.60 and newer. + * + */ +static int mtn_receive(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) +{ + int ret = 0; + aim_rxcallback_t userfunc; + char *sn; + guint8 snlen; + guint16 type1, type2; + + aim_bstream_advance(bs, 8); /* Unknown - All 0's */ + type1 = aimbs_get16(bs); + snlen = aimbs_get8(bs); + sn = aimbs_getstr(bs, snlen); + type2 = aimbs_get16(bs); + + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, type1, sn, type2); + + g_free(sn); + + return ret; +} + static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { @@ -2010,6 +2094,8 @@ static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, return clientautoresp(sess, mod, rx, snac, bs); else if (snac->subtype == 0x000c) return msgack(sess, mod, rx, snac, bs); + else if (snac->subtype == 0x0014) + return mtn_receive(sess, mod, rx, snac, bs); return 0; } diff --git a/protocols/oscar/im.h b/protocols/oscar/im.h index 061ff5b5..42a8a6b1 100644 --- a/protocols/oscar/im.h +++ b/protocols/oscar/im.h @@ -13,6 +13,7 @@ #define AIM_CB_MSG_MISSEDCALL 0x000a #define AIM_CB_MSG_CLIENTAUTORESP 0x000b #define AIM_CB_MSG_ACK 0x000c +#define AIM_CB_MSG_MTN 0x0014 #define AIM_CB_MSG_DEFAULT 0xffff #define AIM_IMFLAGS_AWAY 0x0001 /* mark as an autoreply */ @@ -193,6 +194,7 @@ aim_conn_t *aim_directim_initiate(aim_session_t *, const char *destsn); aim_conn_t *aim_directim_connect(aim_session_t *, const char *sn, const char *addr, const guint8 *cookie); int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type); +int aim_im_sendmtn(aim_session_t *sess, guint16 type1, const char *sn, guint16 type2); int aim_send_im_ch2_statusmessage(aim_session_t *sess, const char *sender, const guint8 *cookie, const char *message, const guint8 state, const guint16 dc); #endif /* __OSCAR_IM_H__ */ diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 160d23ea..5dda3e90 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -220,7 +220,7 @@ static int gaim_offlinemsgdone (aim_session_t *, aim_frame_t *, ...); static int gaim_ssi_parserights (aim_session_t *, aim_frame_t *, ...); static int gaim_ssi_parselist (aim_session_t *, aim_frame_t *, ...); static int gaim_ssi_parseack (aim_session_t *, aim_frame_t *, ...); - +static int gaim_parsemtn (aim_session_t *, aim_frame_t *, ...); static int gaim_icqinfo (aim_session_t *, aim_frame_t *, ...); static int gaim_parseaiminfo (aim_session_t *, aim_frame_t *, ...); @@ -557,6 +557,7 @@ static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) { aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_LIST, gaim_ssi_parselist, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_SRVACK, gaim_ssi_parseack, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO, gaim_parseaiminfo, 0); + aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_MTN, gaim_parsemtn, 0); ((struct oscar_data *)gc->proto_data)->conn = bosconn; for (i = 0; i < (int)strlen(info->bosip); i++) { @@ -1677,6 +1678,7 @@ static int gaim_icbm_param_info(aim_session_t *sess, aim_frame_t *fr, ...) { va_end(ap); /* Maybe senderwarn and recverwarn should be user preferences... */ + params->flags = 0x0000000b; params->maxmsglen = 8000; params->minmsginterval = 0; @@ -2434,6 +2436,25 @@ static int gaim_parseaiminfo(aim_session_t *sess, aim_frame_t *fr, ...) return 1; } +int gaim_parsemtn(aim_session_t *sess, aim_frame_t *fr, ...) +{ + struct gaim_connection * gc = sess->aux_data; + va_list ap; + guint16 type1, type2; + char * sn; + + va_start(ap, fr); + type1 = va_arg(ap, int); + sn = va_arg(ap, char*); + type2 = va_arg(ap, int); + va_end(ap); + + if(type2 == 0x0001 || type2 == 0x0002) + serv_got_typing(gc, sn, 0); + + return 1; +} + static char *oscar_get_status_string( struct gaim_connection *gc, int number ) { struct oscar_data *od = gc->proto_data; @@ -2462,6 +2483,12 @@ static char *oscar_get_status_string( struct gaim_connection *gc, int number ) } } +int oscar_send_typing(struct gaim_connection *gc, char * who, int typing) +{ + struct oscar_data *od = gc->proto_data; + return( aim_im_sendmtn(od->sess, 1, who, typing ? 0x0002 : 0x0000) ); +} + static struct prpl *my_protocol = NULL; void oscar_init(struct prpl *ret) { @@ -2484,5 +2511,7 @@ void oscar_init(struct prpl *ret) { ret->cmp_buddynames = aim_sncmp; ret->get_status_string = oscar_get_status_string; + ret->send_typing = oscar_send_typing; + my_protocol = ret; } -- cgit v1.2.3 From 94281efa4280bd3ef1cecb7cd22deca03ecb5935 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 19 Nov 2005 12:54:01 +0100 Subject: Oops, even BitlBee didn't know yet that channel names can start with &. Now it should. --- protocols/nogaim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index f4a2ecb3..22240d8a 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -770,7 +770,7 @@ struct conversation *serv_got_joined_chat( struct gaim_connection *gc, int id, c c->title = g_strdup( handle ); s = g_new( char, 16 ); - sprintf( s, "#chat_%03d", gc->irc->c_id++ ); + sprintf( s, "&chat_%03d", gc->irc->c_id++ ); c->channel = g_strdup( s ); g_free( s ); -- cgit v1.2.3