Changeset ef5c185
- Timestamp:
- 2007-11-19T23:14:39Z (17 years ago)
- Branches:
- master
- Children:
- 256899f
- Parents:
- 50e1776
- Location:
- protocols
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/conference.c
r50e1776 ref5c185 85 85 86 86 node = xt_new_node( "body", message, NULL ); 87 node = jabber_make_packet( "message", "groupchat", jc->name, node ); 88 89 if( !jabber_write_packet( ic, node ) ) 90 { 91 xt_free_node( node ); 92 return 0; 93 } 94 xt_free_node( node ); 95 96 return 1; 97 } 98 99 int jabber_chat_topic( struct groupchat *c, char *topic ) 100 { 101 struct im_connection *ic = c->ic; 102 struct jabber_chat *jc = c->data; 103 struct xt_node *node; 104 105 node = xt_new_node( "subject", topic, NULL ); 87 106 node = jabber_make_packet( "message", "groupchat", jc->name, node ); 88 107 … … 214 233 void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud, struct xt_node *node ) 215 234 { 235 struct xt_node *subject = xt_find_node( node->children, "subject" ); 216 236 struct xt_node *body = xt_find_node( node->children, "body" ); 217 237 struct groupchat *chat; … … 237 257 } 238 258 259 if( subject ) 260 { 261 s = strchr( bud->ext_jid, '/' ); 262 if( s ) *s = 0; 263 imcb_chat_topic( chat, bud->ext_jid, subject->text_len > 0 ? 264 subject->text : NULL, jabber_get_timestamp( node ) ); 265 if( s ) *s = '/'; 266 } 239 267 if( body && body->text_len > 0 ) 240 268 { -
protocols/jabber/jabber.c
r50e1776 ref5c185 385 385 } 386 386 387 static void jabber_chat_topic_( struct groupchat *c, char *topic ) 388 { 389 if( c && topic ) 390 jabber_chat_topic( c, topic ); 391 } 392 387 393 static void jabber_chat_leave_( struct groupchat *c ) 388 394 { … … 461 467 ret->remove_buddy = jabber_remove_buddy; 462 468 ret->chat_msg = jabber_chat_msg_; 469 ret->chat_topic = jabber_chat_topic_; 463 470 // ret->chat_invite = jabber_chat_invite; 464 471 ret->chat_leave = jabber_chat_leave_; -
protocols/jabber/jabber.h
r50e1776 ref5c185 229 229 void jabber_chat_free( struct groupchat *c ); 230 230 int jabber_chat_msg( struct groupchat *ic, char *message, int flags ); 231 int jabber_chat_topic( struct groupchat *c, char *topic ); 231 232 int jabber_chat_leave( struct groupchat *c, const char *reason ); 232 233 void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bud, struct xt_node *node ); -
protocols/jabber/sasl.c
r50e1776 ref5c185 332 332 struct jabber_data *jd = ic->proto_data; 333 333 334 return ( (void*) ( jd->xt && jd->xt->root && xt_find_attr( jd->xt->root, "version" ) ) ) != NULL;335 } 334 return ( jd->xt && jd->xt->root && xt_find_attr( jd->xt->root, "version" ) ) != 0; 335 } -
protocols/nogaim.c
r50e1776 ref5c185 760 760 } 761 761 762 void imcb_chat_topic( struct groupchat *c, char *who, char *topic )762 void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at ) 763 763 { 764 764 struct im_connection *ic = c->ic; … … 766 766 767 767 if( who == NULL) 768 u = user_find( ic , ic->irc->mynick );768 u = user_find( ic->irc, ic->irc->mynick ); 769 769 else if( g_strcasecmp( who, ic->acc->user ) == 0 ) 770 u = user_find( ic , ic->irc->nick );770 u = user_find( ic->irc, ic->irc->nick ); 771 771 else 772 772 u = user_findhandle( ic, who ); -
protocols/nogaim.h
r50e1776 ref5c185 219 219 event. If it doesn't do that, you have to fake it to make it 220 220 visible to the user. */ 221 void (* chat_topic) (struct groupchat *, char * message);221 void (* chat_topic) (struct groupchat *, char *topic); 222 222 223 223 /* You can tell what away states your protocol supports, so that … … 302 302 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at ); 303 303 /* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */ 304 G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic );304 G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at ); 305 305 G_MODULE_EXPORT void imcb_chat_free( struct groupchat *c ); 306 306
Note: See TracChangeset
for help on using the changeset viewer.