Changeset f5c0d8e
- Timestamp:
- 2010-08-31T20:06:14Z (14 years ago)
- Branches:
- master
- Children:
- 0c85c08
- Parents:
- 8358691 (diff), 31dbb90a (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. - Files:
-
- 1 added
- 3 deleted
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
.bzrignore
r8358691 rf5c0d8e 20 20 bitlbee.info 21 21 bitlbee.exe 22 .depend -
Makefile
r8358691 rf5c0d8e 52 52 53 53 distclean: clean $(subdirs) 54 rm -rf .depend 54 55 rm -f Makefile.settings config.h bitlbee.pc 55 56 find . -name 'DEADJOE' -o -name '*.orig' -o -name '*.rej' -o -name '*~' -exec rm -f {} \; 57 @# May still be present in dirs of disabled protocols. 58 find . -name .depend | xargs -r rmdir 56 59 $(MAKE) -C tests distclean 57 60 … … 105 108 x=$$(basename $$(pwd)); \ 106 109 cd ..; \ 107 tar czf $$x.tar.gz --exclude=debian --exclude=.bzr* $$x110 tar czf $$x.tar.gz --exclude=debian --exclude=.bzr* --exclude=.depend $$x 108 111 109 112 $(subdirs): … … 131 134 helloworld: 132 135 @echo Hello World 136 137 -include .depend/*.d -
configure
r8358691 rf5c0d8e 595 595 fi 596 596 597 case "$CC" in 598 *gcc* ) 599 echo CFLAGS+=-MD -MF .depend/\$@.d >> Makefile.settings 600 for i in . lib protocols protocols/*/; do 601 mkdir -p $i/.depend 602 done 603 esac 604 597 605 if [ "$msn" = 0 ]; then 598 606 echo '#undef WITH_MSN' >> config.h -
doc/user-guide/commands.xml
r8358691 rf5c0d8e 73 73 74 74 <para> 75 By default all your Twitter contacts will come from a contact called twitter_(yourusername). You can change this behaviour using the <emphasis>mode</emphasis> setting (see <emphasis>help set mode</emphasis>).75 By default all your Twitter contacts will appear in a new channel called #twitter_yourusername. You can change this behaviour using the <emphasis>mode</emphasis> setting (see <emphasis>help set mode</emphasis>). 76 76 </para> 77 77 … … 970 970 <bitlbee-setting name="mode" type="string" scope="account"> 971 971 <possible-values>one, many, chat</possible-values> 972 <default>one</default> 973 974 <description> 975 <para> 976 By default, everything from the Twitter module will come from one nick, twitter_(yourusername). If you prefer to have individual nicks for everyone, you can set this setting to "many" instead. 977 </para> 978 979 <para> 980 If you prefer to have all your Twitter things in a separate channel, you can set this setting to "chat". 981 </para> 982 983 <para> 984 In the last two modes, you can send direct messages by /msg'ing your contacts directly. Note, however, that incoming DMs are not fetched yet. 972 <default>chat</default> 973 974 <description> 975 <para> 976 By default, BitlBee will create a separate channel (called #twitter_yourusername) for all your Twitter contacts/messages. 977 </para> 978 979 <para> 980 If you don't want an extra channel, you can set this setting to "one" (everything will come from one nick, twitter_yourusername), or to "many" (individual nicks for everyone). 981 </para> 982 983 <para> 984 With modes "chat" and "many", you can send direct messages by /msg'ing your contacts directly. Note, however, that incoming DMs are not fetched yet. 985 </para> 986 987 <para> 988 With modes "many" and "one", you can post tweets by /msg'ing the twitter_yourusername contact. In mode "chat", messages posted in the Twitter channel will also be posted as tweets. 985 989 </para> 986 990 </description> … … 1637 1641 </bitlbee-command> 1638 1642 1639 <bitlbee-command name="transfer s">1643 <bitlbee-command name="transfer"> 1640 1644 <short-description>Monitor, cancel, or reject file transfers</short-description> 1641 <syntax>transfer s[<cancel> id | <reject>]</syntax>1645 <syntax>transfer [<cancel> id | <reject>]</syntax> 1642 1646 1643 1647 <description> 1644 1648 <para> 1645 Without parameters the currently pending file transfers and their status will be listed. Available actions are <emphasis>cancel</emphasis> and <emphasis>reject</emphasis>. See <emphasis>help transfer s<action></emphasis> for more information.1649 Without parameters the currently pending file transfers and their status will be listed. Available actions are <emphasis>cancel</emphasis> and <emphasis>reject</emphasis>. See <emphasis>help transfer <action></emphasis> for more information. 1646 1650 </para> 1647 1651 1648 1652 <ircexample> 1649 <ircline nick="ulim">transfer s</ircline>1653 <ircline nick="ulim">transfer</ircline> 1650 1654 </ircexample> 1651 1655 </description> … … 1653 1657 <bitlbee-command name="cancel"> 1654 1658 <short-description>Cancels the file transfer with the given id</short-description> 1655 <syntax>transfer s<cancel> id</syntax>1659 <syntax>transfer <cancel> id</syntax> 1656 1660 1657 1661 <description> … … 1660 1664 1661 1665 <ircexample> 1662 <ircline nick="ulim">transfer scancel 1</ircline>1666 <ircline nick="ulim">transfer cancel 1</ircline> 1663 1667 <ircline nick="root">Canceling file transfer for test</ircline> 1664 1668 </ircexample> … … 1667 1671 <bitlbee-command name="reject"> 1668 1672 <short-description>Rejects all incoming transfers</short-description> 1669 <syntax>transfer s<reject></syntax>1673 <syntax>transfer <reject></syntax> 1670 1674 1671 1675 <description> … … 1674 1678 1675 1679 <ircexample> 1676 <ircline nick="ulim">transfer sreject</ircline>1680 <ircline nick="ulim">transfer reject</ircline> 1677 1681 </ircexample> 1678 1682 </bitlbee-command> -
irc.h
r8358691 rf5c0d8e 289 289 void irc_send_channel_user_mode_diff( irc_channel_t *ic, irc_user_t *iu, 290 290 irc_channel_user_flags_t old, irc_channel_user_flags_t new ); 291 void irc_send_invite( irc_user_t *iu, irc_channel_t *ic ); 291 292 292 293 /* irc_user.c */ -
irc_commands.c
r8358691 rf5c0d8e 302 302 char *channel = cmd[1]; 303 303 irc_channel_t *ic; 304 irc_user_t *iu; 304 305 305 306 if( !channel || *channel == '0' || *channel == '*' || !*channel ) … … 307 308 else if( ( ic = irc_channel_by_name( irc, channel ) ) ) 308 309 irc_send_who( irc, ic->users, channel ); 310 else if( ( iu = irc_user_by_name( irc, channel ) ) ) 311 { 312 /* Tiny hack! */ 313 GSList *l = g_slist_append( NULL, iu ); 314 irc_send_who( irc, l, channel ); 315 g_slist_free( l ); 316 } 309 317 else 310 318 irc_send_num( irc, 403, "%s :No such channel", channel ); -
irc_im.c
r8358691 rf5c0d8e 252 252 { 253 253 irc_user_t *iu = (irc_user_t *) bu->ui_data; 254 irc_t *irc = (irc_t *) bee->ui_data;255 254 char *s; 256 255 … … 266 265 if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) ) 267 266 { 267 /* People don't like this /NOTICE. Meh, let's go back to the old one. 268 268 char *msg = g_strdup_printf( "<< \002BitlBee\002 - Changed name to `%s' >>", iu->fullname ); 269 269 irc_send_msg( iu, "NOTICE", irc->user->nick, msg, NULL ); 270 */ 271 imcb_log( bu->ic, "User `%s' changed name to `%s'", iu->nick, iu->fullname ); 270 272 } 271 273 … … 613 615 } 614 616 617 static gboolean bee_irc_chat_invite( bee_t *bee, bee_user_t *bu, const char *name, const char *msg ) 618 { 619 char *channel, *s; 620 irc_t *irc = bee->ui_data; 621 irc_user_t *iu = bu->ui_data; 622 irc_channel_t *chan; 623 624 if( strchr( CTYPES, name[0] ) ) 625 channel = g_strdup( name ); 626 else 627 channel = g_strdup_printf( "#%s", name ); 628 629 if( ( s = strchr( channel, '@' ) ) ) 630 *s = '\0'; 631 632 if( strlen( channel ) > MAX_NICK_LENGTH ) 633 { 634 /* If the channel name is very long (like those insane GTalk 635 UUID names), try if we can use the inviter's nick. */ 636 s = g_strdup_printf( "#%s", iu->nick ); 637 if( irc_channel_by_name( irc, s ) == NULL ) 638 { 639 g_free( channel ); 640 channel = s; 641 } 642 } 643 644 if( ( chan = irc_channel_new( irc, channel ) ) && 645 set_setstr( &chan->set, "type", "chat" ) && 646 set_setstr( &chan->set, "chat_type", "room" ) && 647 set_setstr( &chan->set, "account", bu->ic->acc->tag ) && 648 set_setstr( &chan->set, "room", (char*) name ) ) 649 { 650 /* I'm assuming that if the user didn't "chat add" the room 651 himself but got invited, it's temporary, so make this a 652 temporary mapping that is removed as soon as we /PART. */ 653 chan->flags |= IRC_CHANNEL_TEMP; 654 } 655 else 656 { 657 irc_channel_free( chan ); 658 chan = NULL; 659 } 660 g_free( channel ); 661 662 irc_send_msg_f( iu, "PRIVMSG", irc->user->nick, "<< \002BitlBee\002 - Invitation to chatroom %s >>", name ); 663 if( msg ) 664 irc_send_msg( iu, "PRIVMSG", irc->user->nick, msg, NULL ); 665 if( chan ) 666 { 667 irc_send_msg_f( iu, "PRIVMSG", irc->user->nick, "To join the room, just /join %s", chan->name ); 668 irc_send_invite( iu, chan ); 669 } 670 671 return TRUE; 672 } 673 615 674 /* IRC->IM */ 616 675 static gboolean bee_irc_channel_chat_privmsg_cb( gpointer data, gint fd, b_input_condition cond ); … … 909 968 bee_irc_chat_topic, 910 969 bee_irc_chat_name_hint, 970 bee_irc_chat_invite, 911 971 912 972 bee_irc_ft_in_start, -
irc_send.c
r8358691 rf5c0d8e 264 264 void irc_send_who( irc_t *irc, GSList *l, const char *channel ) 265 265 { 266 gboolean is_channel = strc mp( channel, "**" ) != 0;266 gboolean is_channel = strchr( CTYPES, channel[0] ) != NULL; 267 267 268 268 while( l ) … … 273 273 /* TODO(wilmer): Restore away/channel information here */ 274 274 irc_send_num( irc, 352, "%s %s %s %s %s %c :0 %s", 275 channel ?: "*", iu->user, iu->host, irc->root->host,275 is_channel ? channel : "*", iu->user, iu->host, irc->root->host, 276 276 iu->nick, iu->flags & IRC_USER_AWAY ? 'G' : 'H', 277 277 iu->fullname ); … … 398 398 irc_write( ic->irc, ":%s MODE %s %s", from, ic->name, changes ); 399 399 } 400 401 void irc_send_invite( irc_user_t *iu, irc_channel_t *ic ) 402 { 403 irc_t *irc = iu->irc; 404 405 irc_write( iu->irc, ":%s!%s@%s INVITE %s :%s", 406 iu->nick, iu->user, iu->host, irc->user->nick, ic->name ); 407 } -
lib/Makefile
r8358691 rf5c0d8e 30 30 31 31 distclean: clean $(subdirs) 32 rm -rf .depend 32 33 33 34 ### MAIN PROGRAM … … 42 43 @echo '*' Compiling $< 43 44 @$(CC) -c $(CFLAGS) $< -o $@ 45 46 -include .depend/*.d -
protocols/Makefile
r8358691 rf5c0d8e 40 40 41 41 distclean: clean $(subdirs) 42 rm -rf .depend 42 43 43 44 $(subdirs): … … 55 56 @echo '*' Compiling $< 56 57 @$(CC) -c $(CFLAGS) $< -o $@ 58 59 -include .depend/*.d -
protocols/bee.h
r8358691 rf5c0d8e 123 123 gboolean (*chat_topic)( bee_t *bee, struct groupchat *c, const char *new, bee_user_t *bu ); 124 124 gboolean (*chat_name_hint)( bee_t *bee, struct groupchat *c, const char *name ); 125 gboolean (*chat_invite)( bee_t *bee, bee_user_t *bu, const char *name, const char *msg ); 125 126 126 127 struct file_transfer* (*ft_in_start)( bee_t *bee, bee_user_t *bu, const char *file_name, size_t file_size ); … … 175 176 G_MODULE_EXPORT int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags ); 176 177 G_MODULE_EXPORT struct groupchat *bee_chat_by_title( bee_t *bee, struct im_connection *ic, const char *title ); 178 G_MODULE_EXPORT void imcb_chat_invite( struct im_connection *ic, const char *name, const char *who, const char *msg ); 177 179 178 180 #endif /* __BEE_H__ */ -
protocols/bee_chat.c
r8358691 rf5c0d8e 233 233 return NULL; 234 234 } 235 236 void imcb_chat_invite( struct im_connection *ic, const char *name, const char *who, const char *msg ) 237 { 238 bee_user_t *bu = bee_user_by_handle( ic->bee, ic, who ); 239 240 if( bu && ic->bee->ui->chat_invite ) 241 ic->bee->ui->chat_invite( ic->bee, bu, name, msg ); 242 } -
protocols/jabber/Makefile
r8358691 rf5c0d8e 30 30 31 31 distclean: clean 32 rm -rf .depend 32 33 33 34 ### MAIN PROGRAM … … 42 43 @echo '*' Linking jabber_mod.o 43 44 @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o 45 46 -include .depend/*.d -
protocols/jabber/jabber.h
r8358691 rf5c0d8e 59 59 JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have 60 60 have a real JID. */ 61 JBFLAG_HIDE_SUBJECT = 16, /* Hide the subject field since we probably 62 showed it already. */ 61 63 } jabber_buddy_flags_t; 62 64 -
protocols/jabber/message.c
r8358691 rf5c0d8e 31 31 struct xt_node *body = xt_find_node( node->children, "body" ), *c; 32 32 struct jabber_buddy *bud = NULL; 33 char *s ;33 char *s, *room = NULL, *reason = NULL; 34 34 35 35 if( !from ) … … 52 52 for( c = node->children; ( c = xt_find_node( c, "x" ) ); c = c->next ) 53 53 { 54 char *ns = xt_find_attr( c, "xmlns" ) , *room;55 struct xt_node *inv , *reason;54 char *ns = xt_find_attr( c, "xmlns" ); 55 struct xt_node *inv; 56 56 57 57 if( ns && strcmp( ns, XMLNS_MUC_USER ) == 0 && 58 58 ( inv = xt_find_node( c->children, "invite" ) ) ) 59 59 { 60 /* This is an invitation. Set some vars which 61 will be passed to imcb_chat_invite() below. */ 60 62 room = from; 61 63 if( ( from = xt_find_attr( inv, "from" ) ) == NULL ) 62 64 from = room; 63 64 g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room ); 65 if( ( reason = xt_find_node( inv->children, "reason" ) ) && reason->text_len > 0 ) 66 g_string_append( fullmsg, reason->text ); 65 if( ( inv = xt_find_node( inv->children, "reason" ) ) && inv->text_len > 0 ) 66 reason = inv->text; 67 67 } 68 68 } … … 93 93 } 94 94 } 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 && 96 ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) ) 96 97 { 97 98 g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text ); 99 if( bud ) 100 bud->flags |= JBFLAG_HIDE_SUBJECT; 101 } 102 else if( bud && !c ) 103 { 104 /* Yeah, possibly we're hiding changes to this field now. But nobody uses 105 this for anything useful anyway, except GMail when people reply to an 106 e-mail via chat, repeating the same subject all the time. I don't want 107 to have to remember full subject strings for everyone. */ 108 bud->flags &= ~JBFLAG_HIDE_SUBJECT; 98 109 } 99 110 … … 104 115 imcb_buddy_msg( ic, from, fullmsg->str, 105 116 0, jabber_get_timestamp( node ) ); 117 if( room ) 118 imcb_chat_invite( ic, room, from, reason ); 106 119 107 120 g_string_free( fullmsg, TRUE ); -
protocols/jabber/si.c
r8358691 rf5c0d8e 262 262 break; 263 263 } 264 else 265 { 266 c = c->next; 267 } 264 268 265 269 if ( !requestok ) -
protocols/msn/Makefile
r8358691 rf5c0d8e 30 30 31 31 distclean: clean 32 rm -rf .depend 32 33 33 34 ### MAIN PROGRAM … … 42 43 @echo '*' Linking msn_mod.o 43 44 @$(LD) $(LFLAGS) $(objects) -o msn_mod.o 44 45 45 46 -include .depend/*.d -
protocols/oscar/Makefile
r8358691 rf5c0d8e 31 31 32 32 distclean: clean 33 rm -rf .depend 33 34 34 35 ### MAIN PROGRAM … … 43 44 @echo '*' Linking oscar_mod.o 44 45 @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o 46 47 -include .depend/*.d -
protocols/oscar/oscar.c
r8358691 rf5c0d8e 517 517 /* Incorrect nick/password */ 518 518 imcb_error(ic, _("Incorrect nickname or password.")); 519 { 520 int max = od->icq ? 8 : 16; 521 if (strlen(ic->acc->pass) > max) 522 imcb_log(ic, "Note that the maximum password " 523 "length supported by this protocol is " 524 "%d characters, try logging in using " 525 "a shorter password.", max); 526 } 519 527 // plugin_event(event_error, (void *)980, 0, 0, 0); 520 528 break; -
protocols/purple/Makefile
r8358691 rf5c0d8e 31 31 32 32 distclean: clean 33 rm -rf .depend 33 34 34 35 ### MAIN PROGRAM … … 43 44 @echo '*' Linking purple_mod.o 44 45 $(LD) $(LFLAGS) $(objects) -o purple_mod.o 46 47 -include .depend/*.d -
protocols/twitter/Makefile
r8358691 rf5c0d8e 30 30 31 31 distclean: clean 32 rm -rf .depend 32 33 33 34 ### MAIN PROGRAM … … 43 44 @$(LD) $(LFLAGS) $(objects) -o twitter_mod.o 44 45 45 46 -include .depend/*.d -
protocols/twitter/twitter.c
r8358691 rf5c0d8e 195 195 s = set_add( &acc->set, "message_length", "140", set_eval_int, acc ); 196 196 197 s = set_add( &acc->set, "mode", " one", set_eval_mode, acc );197 s = set_add( &acc->set, "mode", "chat", set_eval_mode, acc ); 198 198 s->flags |= ACC_SET_OFFLINE_ONLY; 199 199 -
protocols/yahoo/Makefile
r8358691 rf5c0d8e 31 31 32 32 distclean: clean 33 rm -rf .depend 33 34 34 35 ### MAIN PROGRAM … … 43 44 @echo '*' Linking yahoo_mod.o 44 45 @$(LD) $(LFLAGS) $(objects) -o yahoo_mod.o 46 47 -include .depend/*.d -
protocols/yahoo/libyahoo2.c
r8358691 rf5c0d8e 2169 2169 yd->buddies = y_list_append(yd->buddies, bud); 2170 2170 2171 #if 0 2172 /* BitlBee: This seems to be wrong in my experience. I think: 2173 status = 0: Success 2174 status = 2: Already on list 2175 status = 3: Doesn't exist 2176 status = 42: Invalid handle (possibly banned/reserved, I get it for 2177 handles like joe or jjjjjj) 2178 Haven't seen others yet. But whenever the add is successful, there 2179 will be a separate "went online" packet when the auth. request is 2180 accepted. Couldn't find any test account that doesn't require auth. 2181 unfortunately (if there is even such a thing?) */ 2182 2171 2183 /* A non-zero status (i've seen 2) seems to mean the buddy is already 2172 2184 * added and is online */ … … 2176 2188 YAHOO_CALLBACK(ext_yahoo_status_changed) (yd->client_id, who, 2177 2189 YAHOO_STATUS_AVAILABLE, NULL, 0, 0, 0); 2190 } 2191 #endif 2192 /* BitlBee: Need ACK of added buddy, if it was successful. */ 2193 if (status == 0) { 2194 YList *tmp = y_list_append(NULL, bud); 2195 YAHOO_CALLBACK(ext_yahoo_got_buddies) (yd->client_id, tmp); 2196 y_list_free(tmp); 2178 2197 } 2179 2198 } -
root_commands.c
r8358691 rf5c0d8e 1284 1284 } 1285 1285 1286 static void cmd_nick( irc_t *irc, char **cmd ) 1287 { 1288 irc_usermsg( irc, "This command is deprecated. Try: account %s set display_name", cmd[1] ); 1289 } 1290 1286 1291 /* Maybe this should be a stand-alone command as well? */ 1287 1292 static void bitlbee_whatsnew( irc_t *irc ) … … 1338 1343 { "identify", 1, cmd_identify, 0 }, 1339 1344 { "info", 1, cmd_info, 0 }, 1345 { "nick", 1, cmd_nick, 0 }, 1340 1346 { "no", 0, cmd_yesno, 0 }, 1341 1347 { "qlist", 0, cmd_qlist, 0 }, -
utils/README
r8358691 rf5c0d8e 18 18 19 19 20 * c reate_nicksfile.pl (Christian Friedl <christian.friedl@chello.at>)20 * convert_purple.py 21 21 22 This program reads your ~/.licq/ configuration data and convert it to a 23 correct .nicks file. This program can be extended to read other contact 24 list file formats as well. 25 26 27 * centericq2bitlbee.sh (geno <geno@xenyon.com>) 28 29 Converter script for CenterICQ ICQ contact lists. See the documentation 30 for more information. 31 32 33 * convert_gnomeicu.txt 34 35 Not a program, but this one contains a regex which should correctly 36 convert GnomeICU configuration files into the BitlBee format. 37 38 39 * Dynamic MOTD for BitlBee (Geert Hauwaerts <geert@hauwaerts.be>) 40 41 Originally, I wanted to put this program here, but Geert put it online 42 on his own server, with docs and stuff, so I guess it's better to put 43 a link here. dmotd is a little script which generates a motd with some 44 nice statistics, especially nice for servers with many people on it. 45 46 See http://dmotd.hauwaerts.be/ for more information. 22 Converts libpurple configs into something BitlBee can use, so you don't 23 have to re-add all your accounts by hand. 47 24 48 25
Note: See TracChangeset
for help on using the changeset viewer.