Changeset bc676ac
- Timestamp:
- 2012-09-16T00:09:58Z (12 years ago)
- Branches:
- master
- Children:
- f9258ae
- Parents:
- ddca104
- Location:
- protocols/msn
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rddca104 rbc676ac 232 232 { 233 233 struct msn_switchboard *sb = msn_sb_by_chat( c ); 234 char buf[1024];235 234 236 235 if( sb ) 237 { 238 g_snprintf( buf, sizeof( buf ), "CAL %d %s\r\n", ++sb->trId, who ); 239 msn_sb_write( sb, buf, strlen( buf ) ); 240 } 236 msn_sb_write( sb, "CAL %d %s\r\n", ++sb->trId, who ); 241 237 } 242 238 … … 246 242 247 243 if( sb ) 248 msn_sb_write( sb, "OUT\r\n" , 5);244 msn_sb_write( sb, "OUT\r\n" ); 249 245 } 250 246 -
protocols/msn/msn.h
rddca104 rbc676ac 53 53 */ 54 54 55 /* <= BitlBee 3.0.5 55 56 #define MSNP11_PROD_KEY "ILTXC!4IXB5FB*PX" 56 57 #define MSNP11_PROD_ID "PROD0119GSJUC$18" 57 #define MSNP_VER "MSNP15" 58 #define MSNP_BUILD "8.5.1288" 58 */ 59 60 #define MSNP11_PROD_KEY "C1BX{V4W}Q3*10SM" 61 #define MSNP11_PROD_ID "PROD0120PW!CCV9@" 62 #define MSNP_VER "MSNP18" 63 #define MSNP_BUILD "14.0.8117.416" 59 64 60 65 #define MSN_SB_NEW -24062002 … … 222 227 223 228 /* ns.c */ 224 int msn_ns_write( struct im_connection *ic, int fd, const char *fmt, ... ) ;229 int msn_ns_write( struct im_connection *ic, int fd, const char *fmt, ... ) G_GNUC_PRINTF( 3, 4 ); 225 230 gboolean msn_ns_connect( struct im_connection *ic, struct msn_handler_data *handler, const char *host, int port ); 226 231 void msn_ns_close( struct msn_handler_data *handler ); … … 228 233 void msn_auth_got_contact_list( struct im_connection *ic ); 229 234 int msn_ns_finish_login( struct im_connection *ic ); 235 int msn_ns_sendmessage( struct im_connection *ic, struct bee_user *bu, const char *text ); 236 void msn_ns_oim_send_queue( struct im_connection *ic, GSList **msgq ); 230 237 231 238 /* msn_util.c */ … … 250 257 251 258 /* sb.c */ 252 int msn_sb_write( struct msn_switchboard *sb, const char *fmt, ... ) ;259 int msn_sb_write( struct msn_switchboard *sb, const char *fmt, ... ) G_GNUC_PRINTF( 2, 3 );; 253 260 struct msn_switchboard *msn_sb_create( struct im_connection *ic, char *host, int port, char *key, int session ); 254 261 struct msn_switchboard *msn_sb_by_handle( struct im_connection *ic, char *handle ); -
protocols/msn/ns.c
rddca104 rbc676ac 757 757 if( token ) 758 758 { 759 msn_ns_write( ic, -1, "USR %d SSO S %s %s \r\n", ++md->trId, md->tokens[0], token );759 msn_ns_write( ic, -1, "USR %d SSO S %s %s {7535ef7c-ff92-11e1-8069-50e5493b06de}\r\n", ++md->trId, md->tokens[0], token ); 760 760 } 761 761 else … … 886 886 return 1; 887 887 } 888 889 int msn_ns_sendmessage( struct im_connection *ic, bee_user_t *bu, const char *text ) 890 { 891 struct msn_data *md = ic->proto_data; 892 char *buf; 893 894 if( strncmp( text, "\r\r\r", 3 ) == 0 ) 895 /* Err. Shouldn't happen but I guess it can. Don't send others 896 any of the "SHAKE THAT THING" messages. :-D */ 897 return 1; 898 899 buf = g_strdup_printf( "%s%s", MSN_MESSAGE_HEADERS, text ); 900 901 if( msn_ns_write( ic, -1, "UUM %d %s %d %d %zd\r\n%s", 902 ++md->trId, bu->handle, 903 1, /* type == MSN offline message */ 904 1, /* type == IM (not nudge/typing) */ 905 strlen( buf ), buf ) ) 906 return 1; 907 else 908 return 0; 909 } 910 911 void msn_ns_oim_send_queue( struct im_connection *ic, GSList **msgq ) 912 { 913 GSList *l; 914 915 for( l = *msgq; l; l = l->next ) 916 { 917 struct msn_message *m = l->data; 918 bee_user_t *bu = bee_user_by_handle( ic->bee, ic, m->who ); 919 920 if( bu ) 921 if( !msn_ns_sendmessage( ic, bu, m->text ) ) 922 return; 923 } 924 925 while( *msgq != NULL ) 926 { 927 struct msn_message *m = (*msgq)->data; 928 929 g_free( m->who ); 930 g_free( m->text ); 931 g_free( m ); 932 933 *msgq = g_slist_remove( *msgq, m ); 934 } 935 } -
protocols/msn/sb.c
rddca104 rbc676ac 629 629 /* If the person is offline, send an offline message instead, 630 630 and don't report an error. */ 631 /* TODO: Support for OIMs that works. (#874) */632 /*633 631 if( num == 217 ) 634 msn_ soap_oim_send_queue( ic, &sb->msgq );632 msn_ns_oim_send_queue( ic, &sb->msgq ); 635 633 else 636 */637 634 imcb_error( ic, "Error reported by switchboard server: %s", err->text ); 638 635
Note: See TracChangeset
for help on using the changeset viewer.