Changeset 1ba7e8f for protocols/nogaim.c
- Timestamp:
- 2008-02-15T17:38:57Z (17 years ago)
- Branches:
- master
- Children:
- 506e61b
- Parents:
- 0fbd3a6d (diff), eeb85a8 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r0fbd3a6d r1ba7e8f 625 625 } 626 626 627 void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u _int32_t flags, time_t sent_at )627 void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at ) 628 628 { 629 629 irc_t *irc = ic->irc; … … 676 676 } 677 677 678 void imcb_buddy_typing( struct im_connection *ic, char *handle, u _int32_t flags )678 void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ) 679 679 { 680 680 user_t *u; … … 690 690 irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf ); 691 691 } 692 } 693 694 struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle ) 695 { 696 struct groupchat *c; 697 698 /* This one just creates the conversation structure, user won't see anything yet */ 699 700 if( ic->groupchats ) 701 { 702 for( c = ic->groupchats; c->next; c = c->next ); 703 c = c->next = g_new0( struct groupchat, 1 ); 704 } 705 else 706 ic->groupchats = c = g_new0( struct groupchat, 1 ); 707 708 c->ic = ic; 709 c->title = g_strdup( handle ); 710 c->channel = g_strdup_printf( "&chat_%03d", ic->irc->c_id++ ); 711 c->topic = g_strdup_printf( "BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", c->title ); 712 713 if( set_getbool( &ic->irc->set, "debug" ) ) 714 imcb_log( ic, "Creating new conversation: (id=%p,handle=%s)", c, handle ); 715 716 return c; 692 717 } 693 718 … … 728 753 g_free( c->channel ); 729 754 g_free( c->title ); 755 g_free( c->topic ); 730 756 g_free( c ); 731 757 } 732 758 } 733 759 734 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u _int32_t flags, time_t sent_at )760 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at ) 735 761 { 736 762 struct im_connection *ic = c->ic; … … 758 784 } 759 785 g_free( wrapped ); 786 } 787 788 void imcb_chat_log( struct groupchat *c, char *format, ... ) 789 { 790 irc_t *irc = c->ic->irc; 791 va_list params; 792 char *text; 793 user_t *u; 794 795 va_start( params, format ); 796 text = g_strdup_vprintf( format, params ); 797 va_end( params ); 798 799 u = user_find( irc, irc->mynick ); 800 801 irc_privmsg( irc, u, "PRIVMSG", c->channel, "System message: ", text ); 802 803 g_free( text ); 760 804 } 761 805 … … 781 825 if( c->joined && u ) 782 826 irc_write( ic->irc, ":%s!%s@%s TOPIC %s :%s", u->nick, u->user, u->host, c->channel, topic ); 783 }784 785 struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle )786 {787 struct groupchat *c;788 789 /* This one just creates the conversation structure, user won't see anything yet */790 791 if( ic->groupchats )792 {793 for( c = ic->groupchats; c->next; c = c->next );794 c = c->next = g_new0( struct groupchat, 1 );795 }796 else797 ic->groupchats = c = g_new0( struct groupchat, 1 );798 799 c->ic = ic;800 c->title = g_strdup( handle );801 c->channel = g_strdup_printf( "&chat_%03d", ic->irc->c_id++ );802 c->topic = g_strdup_printf( "%s :BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", c->channel, c->title );803 804 if( set_getbool( &ic->irc->set, "debug" ) )805 imcb_log( ic, "Creating new conversation: (id=%p,handle=%s)", c, handle );806 807 return c;808 827 } 809 828
Note: See TracChangeset
for help on using the changeset viewer.