Changeset 2288705 for protocols/jabber
- Timestamp:
- 2009-12-07T21:54:19Z (15 years ago)
- Branches:
- master
- Children:
- 1c3008a
- Parents:
- aac4017 (diff), 36cf9fd (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/jabber
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/conference.c
raac4017 r2288705 26 26 static xt_status jabber_chat_join_failed( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ); 27 27 28 struct groupchat *jabber_chat_join( struct im_connection *ic, c har *room, char *nick,char *password )28 struct groupchat *jabber_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password ) 29 29 { 30 30 struct jabber_chat *jc; … … 36 36 node = xt_new_node( "x", NULL, NULL ); 37 37 xt_add_attr( node, "xmlns", XMLNS_MUC ); 38 node = jabber_make_packet( "presence", NULL, roomjid, node );39 38 if( password ) 40 39 xt_add_child( node, xt_new_node( "password", password, NULL ) ); 40 node = jabber_make_packet( "presence", NULL, roomjid, node ); 41 41 jabber_cache_add( ic, node, jabber_chat_join_failed ); 42 42 … … 234 234 ( strcmp( s, XMLNS_MUC_USER ) == 0 ) ) 235 235 { 236 c = xt_find_node( c->children, "item" ); 237 if( ( s = xt_find_attr( c, "jid" ) ) ) 236 struct xt_node *item; 237 238 item = xt_find_node( c->children, "item" ); 239 if( ( s = xt_find_attr( item, "jid" ) ) ) 238 240 { 239 241 /* Yay, found what we need. :-) */ … … 283 285 else if( type ) /* type can only be NULL or "unavailable" in this function */ 284 286 { 285 s = strchr( bud->ext_jid, '/' ); 286 if( s ) *s = 0; 287 imcb_chat_remove_buddy( chat, bud->ext_jid, NULL ); 288 if( bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS ) 289 imcb_remove_buddy( ic, bud->ext_jid, NULL ); 290 if( s ) *s = '/'; 287 if( ( bud->flags & JBFLAG_IS_CHATROOM ) && bud->ext_jid ) 288 { 289 s = strchr( bud->ext_jid, '/' ); 290 if( s ) *s = 0; 291 imcb_chat_remove_buddy( chat, bud->ext_jid, NULL ); 292 if( bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS ) 293 imcb_remove_buddy( ic, bud->ext_jid, NULL ); 294 if( s ) *s = '/'; 295 } 291 296 292 297 if( bud == jc->me ) -
protocols/jabber/iq.c
raac4017 r2288705 51 51 { 52 52 if( !( ( c = xt_find_node( node->children, "query" ) ) || 53 ( c = xt_find_node( node->children, "ping" ) ) ) || /* O_o WHAT is wrong with just <query/> ????? */53 ( c = xt_find_node( node->children, "ping" ) ) ) || 54 54 !( s = xt_find_attr( c, "xmlns" ) ) ) 55 55 { 56 imcb_log( ic, "Warning: Received incomplete IQ-%s packet", type ); 56 /* Sigh. Who decided to suddenly invent new elements 57 instead of just sticking with <query/>? */ 57 58 return XT_HANDLED; 58 59 } -
protocols/jabber/jabber.c
raac4017 r2288705 70 70 71 71 s = set_add( &acc->set, "server", NULL, set_eval_account, acc ); 72 s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY ;72 s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK; 73 73 74 74 s = set_add( &acc->set, "ssl", "false", set_eval_bool, acc ); … … 439 439 } 440 440 441 static struct groupchat *jabber_chat_join_( struct im_connection *ic, c har *room, char *nick,char *password )441 static struct groupchat *jabber_chat_join_( struct im_connection *ic, const char *room, const char *nick, const char *password ) 442 442 { 443 443 if( strchr( room, '@' ) == NULL ) -
protocols/jabber/jabber.h
raac4017 r2288705 27 27 #include <glib.h> 28 28 29 #include "bitlbee.h" 30 #include "md5.h" 29 31 #include "xmltree.h" 30 #include "bitlbee.h"31 32 32 33 extern GSList *jabber_connections; … … 302 303 303 304 /* conference.c */ 304 struct groupchat *jabber_chat_join( struct im_connection *ic, c har *room, char *nick,char *password );305 struct groupchat *jabber_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password ); 305 306 struct groupchat *jabber_chat_by_jid( struct im_connection *ic, const char *name ); 306 307 void jabber_chat_free( struct groupchat *c ); -
protocols/jabber/jabber_util.c
raac4017 r2288705 37 37 /* Priority is a signed 8-bit integer, according to RFC 3921. */ 38 38 if( i < -128 || i > 127 ) 39 return NULL;39 return SET_INVALID; 40 40 } 41 41 else 42 return NULL;42 return SET_INVALID; 43 43 44 44 /* Only run this stuff if the account is online ATM, -
protocols/jabber/presence.c
raac4017 r2288705 49 49 if( !( bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT | GET_BUDDY_CREAT ) ) ) 50 50 { 51 if( set_getbool( &ic->irc->set, "debug" ) ) 52 imcb_log( ic, "Warning: Could not handle presence information from JID: %s", from ); 51 /* 52 imcb_log( ic, "Warning: Could not handle presence information from JID: %s", from ); 53 */ 53 54 return XT_HANDLED; 54 55 } … … 106 107 if( ( bud = jabber_buddy_by_jid( ic, from, 0 ) ) == NULL ) 107 108 { 108 if( set_getbool( &ic->irc->set, "debug" ) ) 109 imcb_log( ic, "Warning: Received presence information from unknown JID: %s", from ); 109 /* 110 imcb_log( ic, "Warning: Received presence information from unknown JID: %s", from ); 111 */ 110 112 return XT_HANDLED; 111 113 }
Note: See TracChangeset
for help on using the changeset viewer.