- Timestamp:
- 2006-09-21T07:32:39Z (18 years ago)
- Branches:
- master
- Children:
- 4a0614e
- Parents:
- 0b4a0db
- Location:
- protocols/jabber
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r0b4a0db rdd788bb 112 112 } 113 113 114 static GList *jabber_away_states( struct gaim_connection *gc ) 115 { 116 GList *l = NULL; 117 118 l = g_list_append( l, (void*) "Online" ); 119 l = g_list_append( l, (void*) "Away" ); 120 l = g_list_append( l, (void*) "Extended Away" ); 121 l = g_list_append( l, (void*) "Do Not Disturb" ); 122 123 return( l ); 124 } 125 126 static void jabber_set_away( struct gaim_connection *gc, char *state, char *message ) 127 { 128 } 129 114 130 void jabber_init() 115 131 { … … 121 137 ret->close = jabber_close; 122 138 ret->send_im = jabber_send_im; 123 //ret->away_states = jabber_away_states;139 ret->away_states = jabber_away_states; 124 140 // ret->get_status_string = jabber_get_status_string; 125 //ret->set_away = jabber_set_away;141 ret->set_away = jabber_set_away; 126 142 // ret->set_info = jabber_set_info; 127 143 // ret->get_info = jabber_get_info; -
protocols/jabber/message.c
r0b4a0db rdd788bb 26 26 xt_status jabber_pkt_message( struct xt_node *node, gpointer data ) 27 27 { 28 struct gaim_connection *gc = data; 28 29 char *from = xt_find_attr( node, "from" ); 30 char *type = xt_find_attr( node, "type" ); 29 31 struct xt_node *msg = xt_find_node( node->children, "body" ); 30 32 31 printf( "Received MSG from %s: %s\n", from, msg ? msg->text : "<null>" ); 32 xt_print( node ); 33 if( !type || !msg ) 34 return XT_HANDLED; /* Grmbl... FIXME */ 35 36 if( strcmp( type, "chat" ) == 0 ) 37 { 38 char *s; 39 40 s = strchr( from, '/' ); 41 if( s ) 42 *s = 0; 43 44 serv_got_im( gc, from, msg->text, 0, 0, 0 ); 45 46 if( s ) 47 *s = '/'; 48 } 49 else 50 { 51 printf( "Received MSG from %s: %s\n", from, msg ? msg->text : "<null>" ); 52 xt_print( node ); 53 } 33 54 34 55 return XT_HANDLED;
Note: See TracChangeset
for help on using the changeset viewer.