- Timestamp:
- 2005-11-19T15:17:03Z (19 years ago)
- Branches:
- master
- Children:
- 9c8ae50, b20b32f
- Parents:
- c998255 (diff), 94281ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols
- Files:
-
- 8 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
rc998255 r2cdd8ce 1123 1123 */ 1124 1124 struct jabber_add_permit *jap = g_new0(struct jabber_add_permit, 1); 1125 gchar *msg = g_strdup_printf(_("The user %s wants to add you to their buddy list."),1125 gchar *msg = g_strdup_printf(_("The user %s wants to add you to his/her buddy list."), 1126 1126 Jid); 1127 1127 -
protocols/msn/msn_util.c
rc998255 r2cdd8ce 166 166 167 167 g_snprintf( buf, sizeof( buf ), 168 "The user %s (%s) wants to add you to his/her buddy list. Do you want to allow this?",168 "The user %s (%s) wants to add you to his/her buddy list.", 169 169 handle, realname ); 170 170 do_ask_dialog( gc, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no ); -
protocols/nogaim.c
rc998255 r2cdd8ce 184 184 gc->prpl->set_away( gc, s, away ); 185 185 if( set_getint( gc->irc, "debug" ) ) 186 irc_usermsg( gc->irc, "Setting away state for %s to %s", gc->prpl->name, s );186 serv_got_crap( gc, "Setting away state to %s", s ); 187 187 } 188 188 else … … 277 277 void set_login_progress( struct gaim_connection *gc, int step, char *msg ) 278 278 { 279 irc_usermsg( gc->irc, "%s(%s) - Logging in: %s", gc->prpl->name, gc->username, msg );279 serv_got_crap( gc, "Logging in: %s", msg ); 280 280 } 281 281 … … 283 283 void hide_login_progress( struct gaim_connection *gc, char *msg ) 284 284 { 285 irc_usermsg( gc->irc, "%s(%s) - Login error: %s", gc->prpl->name, gc->username, msg );285 serv_got_crap( gc, "Login error: %s", msg ); 286 286 } 287 287 … … 289 289 void hide_login_progress_error( struct gaim_connection *gc, char *msg ) 290 290 { 291 irc_usermsg( gc->irc, "%s(%s) - Logged out: %s", gc->prpl->name, gc->username, msg );291 serv_got_crap( gc, "Logged out: %s", msg ); 292 292 } 293 293 … … 308 308 msg = text; 309 309 310 /* if( g_strcasecmp( set_getstr(gc->irc, "html" ), "strip" ) == 0 ) */311 if( gc->flags & OPT_CONN_HTML)310 if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || 311 ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) 312 312 strip_html( msg ); 313 313 … … 337 337 u = user_find( gc->irc, gc->irc->nick ); 338 338 339 irc_usermsg( gc->irc, "%s(%s) - Logged in", gc->prpl->name, gc->username);339 serv_got_crap( gc, "Logged in" ); 340 340 341 341 gc->keepalive = g_timeout_add( 60000, send_keepalive, gc ); … … 351 351 352 352 if( u == NULL ) 353 irc_usermsg( gc->irc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. "353 serv_got_crap( gc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. " 354 354 "See \x02""help import_buddies\x02"" for more information." ); 355 355 } … … 384 384 account_t *a; 385 385 386 irc_usermsg( gc->irc, "%s(%s) - Signing off..", gc->prpl->name, gc->username);386 serv_got_crap( gc, "Signing off.." ); 387 387 388 388 gaim_input_remove( gc->keepalive ); … … 416 416 { 417 417 int delay = set_getint( irc, "auto_reconnect_delay" ); 418 irc_usermsg( gc->irc, "%s(%s) - Reconnecting in %d seconds..", gc->prpl->name, gc->username, delay);418 serv_got_crap( gc, "Reconnecting in %d seconds..", delay ); 419 419 420 420 a->reconnect = 1; … … 430 430 void do_error_dialog( struct gaim_connection *gc, char *msg, char *title ) 431 431 { 432 irc_usermsg( gc->irc, "%s(%s) - Error: %s", gc->prpl->name, gc->username, msg );432 serv_got_crap( gc, "Error: %s", msg ); 433 433 } 434 434 … … 459 459 460 460 if( set_getint( irc, "debug" ) && 0 ) /* This message is too useless */ 461 irc_usermsg( irc, "Receiving user add from protocol: %s", handle );461 serv_got_crap( gc, "Receiving user add from handle: %s", handle ); 462 462 463 463 if( user_findhandle( gc, handle ) ) 464 464 { 465 465 if( set_getint( irc, "debug" ) ) 466 irc_usermsg( irc, "User already exists, ignoring add request: %s", handle );466 serv_got_crap( gc, "User already exists, ignoring add request: %s", handle ); 467 467 468 468 return; … … 557 557 558 558 if( ( gc->flags & OPT_LOGGED_IN ) && set_getint( gc->irc, "display_namechanges" ) ) 559 irc_usermsg( gc->irc, "User `%s' changed name to `%s'", u->nick, u->realname );559 serv_got_crap( gc, "User `%s' changed name to `%s'", u->nick, u->realname ); 560 560 } 561 561 } … … 590 590 if( set_getint( gc->irc, "debug" ) || g_strcasecmp( set_getstr( gc->irc, "handle_unknown" ), "ignore" ) != 0 ) 591 591 { 592 irc_usermsg( gc->irc, "serv_got_update() for handle %s on connection %s(%s):", handle, gc->prpl->name, gc->username );593 irc_usermsg( gc->irc, "loggedin = %d, type = %d", loggedin, type );592 serv_got_crap( gc, "serv_got_update() for handle %s:", handle ); 593 serv_got_crap( gc, "loggedin = %d, type = %d", loggedin, type ); 594 594 } 595 595 … … 671 671 { 672 672 if( set_getint( irc, "debug" ) ) 673 irc_usermsg( irc, "Ignoring message from unknown handle %s on connection %s(%s)", handle, gc->prpl->name, gc->username );673 serv_got_crap( gc, "Ignoring message from unknown handle %s", handle ); 674 674 675 675 return; … … 693 693 else 694 694 { 695 irc_usermsg( irc, "Message from unknown handle %s on connection %s(%s):", handle, gc->prpl->name, gc->username );695 serv_got_crap( gc, "Message from unknown handle %s:", handle ); 696 696 u = user_find( irc, irc->mynick ); 697 697 } 698 698 } 699 699 700 /* if( g_strcasecmp( set_getstr( irc, "html" ), "strip" ) == 0 ) */701 if( gc->flags & OPT_CONN_HTML)700 if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || 701 ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) 702 702 strip_html( msg ); 703 703 … … 753 753 754 754 if( set_getint( gc->irc, "debug" ) ) 755 irc_usermsg( gc->irc, "You were removed from conversation %d", (int) id );755 serv_got_crap( gc, "You were removed from conversation %d", (int) id ); 756 756 757 757 for( c = gc->conversations; c && c->id != id; c = (l=c)->next ); … … 798 798 for( c = gc->conversations; c && c->id != id; c = c->next ); 799 799 800 /* if( g_strcasecmp( set_getstr( gc->irc, "html" ), "strip" ) == 0 ) */801 if( gc->flags & OPT_CONN_HTML)800 if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || 801 ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) 802 802 strip_html( msg ); 803 803 … … 809 809 irc_privmsg( gc->irc, u, "PRIVMSG", c->channel, "", msg ); 810 810 else 811 irc_usermsg( gc->irc, "Message from/to conversation %s@%d (unknown conv/user): %s", who, id, msg );811 serv_got_crap( gc, "Message from/to conversation %s@%d (unknown conv/user): %s", who, id, msg ); 812 812 } 813 813 … … 832 832 833 833 s = g_new( char, 16 ); 834 sprintf( s, " #chat_%03d", gc->irc->c_id++ );834 sprintf( s, "&chat_%03d", gc->irc->c_id++ ); 835 835 c->channel = g_strdup( s ); 836 836 g_free( s ); 837 837 838 838 if( set_getint( gc->irc, "debug" ) ) 839 irc_usermsg( gc->irc, "Creating new conversation: (id=%d,handle=%s)", id, handle );839 serv_got_crap( gc, "Creating new conversation: (id=%d,handle=%s)", id, handle ); 840 840 841 841 return( c ); … … 856 856 857 857 if( set_getint( b->gc->irc, "debug" ) ) 858 irc_usermsg( b->gc->irc, "User %s added to conversation %d", handle, b->id );858 serv_got_crap( b->gc, "User %s added to conversation %d", handle, b->id ); 859 859 860 860 /* It might be yourself! */ … … 890 890 891 891 if( set_getint( b->gc->irc, "debug" ) ) 892 irc_usermsg( b->gc->irc, "User %s removed from conversation %d (%s)", handle, b->id, reason ? reason : "" );892 serv_got_crap( b->gc, "User %s removed from conversation %d (%s)", handle, b->id, reason ? reason : "" ); 893 893 894 894 /* It might be yourself! */ … … 1031 1031 msg = buf; 1032 1032 1033 if( u->gc->flags & OPT_CONN_HTML) { 1034 char * html = escape_html(msg); 1035 strncpy(buf, html, 8192); 1036 g_free(html); 1033 if( ( u->gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) 1034 { 1035 char *html; 1036 1037 html = escape_html( msg ); 1038 strncpy( buf, html, 8192 ); 1039 g_free( html ); 1040 1041 msg = buf; 1037 1042 } 1038 1043 -
protocols/oscar/im.c
rc998255 r2cdd8ce 1996 1996 } 1997 1997 1998 /* 1999 * Subtype 0x0014 - Send a mini typing notification (mtn) packet. 2000 * 2001 * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer, 2002 * and Gaim 0.60 and newer. 2003 * 2004 */ 2005 int aim_im_sendmtn(aim_session_t *sess, guint16 type1, const char *sn, guint16 type2) 2006 { 2007 aim_conn_t *conn; 2008 aim_frame_t *fr; 2009 aim_snacid_t snacid; 2010 2011 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0002))) 2012 return -EINVAL; 2013 2014 if (!sn) 2015 return -EINVAL; 2016 2017 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+11+strlen(sn)+2))) 2018 return -ENOMEM; 2019 2020 snacid = aim_cachesnac(sess, 0x0004, 0x0014, 0x0000, NULL, 0); 2021 aim_putsnac(&fr->data, 0x0004, 0x0014, 0x0000, snacid); 2022 2023 /* 2024 * 8 days of light 2025 * Er, that is to say, 8 bytes of 0's 2026 */ 2027 aimbs_put16(&fr->data, 0x0000); 2028 aimbs_put16(&fr->data, 0x0000); 2029 aimbs_put16(&fr->data, 0x0000); 2030 aimbs_put16(&fr->data, 0x0000); 2031 2032 /* 2033 * Type 1 (should be 0x0001 for mtn) 2034 */ 2035 aimbs_put16(&fr->data, type1); 2036 2037 /* 2038 * Dest sn 2039 */ 2040 aimbs_put8(&fr->data, strlen(sn)); 2041 aimbs_putraw(&fr->data, sn, strlen(sn)); 2042 2043 /* 2044 * Type 2 (should be 0x0000, 0x0001, or 0x0002 for mtn) 2045 */ 2046 aimbs_put16(&fr->data, type2); 2047 2048 aim_tx_enqueue(sess, fr); 2049 2050 return 0; 2051 } 2052 2053 /* 2054 * Subtype 0x0014 - Receive a mini typing notification (mtn) packet. 2055 * 2056 * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer, 2057 * and Gaim 0.60 and newer. 2058 * 2059 */ 2060 static int mtn_receive(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) 2061 { 2062 int ret = 0; 2063 aim_rxcallback_t userfunc; 2064 char *sn; 2065 guint8 snlen; 2066 guint16 type1, type2; 2067 2068 aim_bstream_advance(bs, 8); /* Unknown - All 0's */ 2069 type1 = aimbs_get16(bs); 2070 snlen = aimbs_get8(bs); 2071 sn = aimbs_getstr(bs, snlen); 2072 type2 = aimbs_get16(bs); 2073 2074 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) 2075 ret = userfunc(sess, rx, type1, sn, type2); 2076 2077 g_free(sn); 2078 2079 return ret; 2080 } 2081 1998 2082 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) 1999 2083 { … … 2011 2095 else if (snac->subtype == 0x000c) 2012 2096 return msgack(sess, mod, rx, snac, bs); 2097 else if (snac->subtype == 0x0014) 2098 return mtn_receive(sess, mod, rx, snac, bs); 2013 2099 2014 2100 return 0; -
protocols/oscar/im.h
rc998255 r2cdd8ce 14 14 #define AIM_CB_MSG_CLIENTAUTORESP 0x000b 15 15 #define AIM_CB_MSG_ACK 0x000c 16 #define AIM_CB_MSG_MTN 0x0014 16 17 #define AIM_CB_MSG_DEFAULT 0xffff 17 18 … … 194 195 195 196 int aim_send_im_ch2_geticqmessage(aim_session_t *sess, const char *sn, int type); 197 int aim_im_sendmtn(aim_session_t *sess, guint16 type1, const char *sn, guint16 type2); 196 198 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); 197 199 -
protocols/oscar/oscar.c
rc998255 r2cdd8ce 221 221 static int gaim_ssi_parselist (aim_session_t *, aim_frame_t *, ...); 222 222 static int gaim_ssi_parseack (aim_session_t *, aim_frame_t *, ...); 223 223 static int gaim_parsemtn (aim_session_t *, aim_frame_t *, ...); 224 224 static int gaim_icqinfo (aim_session_t *, aim_frame_t *, ...); 225 225 static int gaim_parseaiminfo (aim_session_t *, aim_frame_t *, ...); … … 556 556 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_SRVACK, gaim_ssi_parseack, 0); 557 557 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO, gaim_parseaiminfo, 0); 558 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_MTN, gaim_parsemtn, 0); 558 559 559 560 ((struct oscar_data *)gc->proto_data)->conn = bosconn; … … 1676 1677 1677 1678 /* Maybe senderwarn and recverwarn should be user preferences... */ 1679 params->flags = 0x0000000b; 1678 1680 params->maxmsglen = 8000; 1679 1681 params->minmsginterval = 0; … … 2433 2435 } 2434 2436 2437 int gaim_parsemtn(aim_session_t *sess, aim_frame_t *fr, ...) 2438 { 2439 struct gaim_connection * gc = sess->aux_data; 2440 va_list ap; 2441 guint16 type1, type2; 2442 char * sn; 2443 2444 va_start(ap, fr); 2445 type1 = va_arg(ap, int); 2446 sn = va_arg(ap, char*); 2447 type2 = va_arg(ap, int); 2448 va_end(ap); 2449 2450 if(type2 == 0x0001 || type2 == 0x0002) 2451 serv_got_typing(gc, sn, 0); 2452 2453 return 1; 2454 } 2455 2435 2456 static char *oscar_get_status_string( struct gaim_connection *gc, int number ) 2436 2457 { … … 2459 2480 return( "Away" ); 2460 2481 } 2482 } 2483 2484 int oscar_send_typing(struct gaim_connection *gc, char * who, int typing) 2485 { 2486 struct oscar_data *od = gc->proto_data; 2487 return( aim_im_sendmtn(od->sess, 1, who, typing ? 0x0002 : 0x0000) ); 2461 2488 } 2462 2489 … … 2482 2509 ret->cmp_buddynames = aim_sncmp; 2483 2510 ret->get_status_string = oscar_get_status_string; 2511 ret->send_typing = oscar_send_typing; 2484 2512 2485 2513 register_protocol(ret); -
protocols/util.c
rc998255 r2cdd8ce 377 377 if( html == NULL ) 378 378 return( NULL ); 379 if( g_strncasecmp( html, "<html>", 6 ) == 0 )380 return( g_strdup( html ) );381 379 382 380 ret = g_string_new( "" ); -
protocols/yahoo/yahoo.c
rc998255 r2cdd8ce 845 845 if( c ) 846 846 add_chat_buddy( c, who ); 847 else if( set_getint( gc->irc, "debug" ) )848 serv_got_crap( gc, "Got ext_yahoo_conf_userjoin() from %s for unknown conference %s", who, room );849 847 } 850 848 … … 858 856 if( c ) 859 857 remove_chat_buddy( c, who, "" ); 860 else if( set_getint( gc->irc, "debug" ) )861 serv_got_crap( gc, "Got ext_yahoo_conf_userleave() from %s for unknown conference %s", who, room );862 858 } 863 859
Note: See TracChangeset
for help on using the changeset viewer.