Changes in / [f5c0d8e:8358691]
- Files:
-
- 3 added
- 1 deleted
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
.bzrignore
rf5c0d8e r8358691 20 20 bitlbee.info 21 21 bitlbee.exe 22 .depend -
Makefile
rf5c0d8e r8358691 52 52 53 53 distclean: clean $(subdirs) 54 rm -rf .depend55 54 rm -f Makefile.settings config.h bitlbee.pc 56 55 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 rmdir59 56 $(MAKE) -C tests distclean 60 57 … … 108 105 x=$$(basename $$(pwd)); \ 109 106 cd ..; \ 110 tar czf $$x.tar.gz --exclude=debian --exclude=.bzr* --exclude=.depend$$x107 tar czf $$x.tar.gz --exclude=debian --exclude=.bzr* $$x 111 108 112 109 $(subdirs): … … 134 131 helloworld: 135 132 @echo Hello World 136 137 -include .depend/*.d -
configure
rf5c0d8e r8358691 595 595 fi 596 596 597 case "$CC" in598 *gcc* )599 echo CFLAGS+=-MD -MF .depend/\$@.d >> Makefile.settings600 for i in . lib protocols protocols/*/; do601 mkdir -p $i/.depend602 done603 esac604 605 597 if [ "$msn" = 0 ]; then 606 598 echo '#undef WITH_MSN' >> config.h -
doc/user-guide/commands.xml
rf5c0d8e r8358691 73 73 74 74 <para> 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>).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>). 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>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. 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. 989 985 </para> 990 986 </description> … … 1641 1637 </bitlbee-command> 1642 1638 1643 <bitlbee-command name="transfer ">1639 <bitlbee-command name="transfers"> 1644 1640 <short-description>Monitor, cancel, or reject file transfers</short-description> 1645 <syntax>transfer [<cancel> id | <reject>]</syntax>1641 <syntax>transfers [<cancel> id | <reject>]</syntax> 1646 1642 1647 1643 <description> 1648 1644 <para> 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.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 transfers <action></emphasis> for more information. 1650 1646 </para> 1651 1647 1652 1648 <ircexample> 1653 <ircline nick="ulim">transfer </ircline>1649 <ircline nick="ulim">transfers</ircline> 1654 1650 </ircexample> 1655 1651 </description> … … 1657 1653 <bitlbee-command name="cancel"> 1658 1654 <short-description>Cancels the file transfer with the given id</short-description> 1659 <syntax>transfer <cancel> id</syntax>1655 <syntax>transfers <cancel> id</syntax> 1660 1656 1661 1657 <description> … … 1664 1660 1665 1661 <ircexample> 1666 <ircline nick="ulim">transfer cancel 1</ircline>1662 <ircline nick="ulim">transfers cancel 1</ircline> 1667 1663 <ircline nick="root">Canceling file transfer for test</ircline> 1668 1664 </ircexample> … … 1671 1667 <bitlbee-command name="reject"> 1672 1668 <short-description>Rejects all incoming transfers</short-description> 1673 <syntax>transfer <reject></syntax>1669 <syntax>transfers <reject></syntax> 1674 1670 1675 1671 <description> … … 1678 1674 1679 1675 <ircexample> 1680 <ircline nick="ulim">transfer reject</ircline>1676 <ircline nick="ulim">transfers reject</ircline> 1681 1677 </ircexample> 1682 1678 </bitlbee-command> -
irc.h
rf5c0d8e r8358691 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 );292 291 293 292 /* irc_user.c */ -
irc_commands.c
rf5c0d8e r8358691 302 302 char *channel = cmd[1]; 303 303 irc_channel_t *ic; 304 irc_user_t *iu;305 304 306 305 if( !channel || *channel == '0' || *channel == '*' || !*channel ) … … 308 307 else if( ( ic = irc_channel_by_name( irc, channel ) ) ) 309 308 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 }317 309 else 318 310 irc_send_num( irc, 403, "%s :No such channel", channel ); -
irc_im.c
rf5c0d8e r8358691 252 252 { 253 253 irc_user_t *iu = (irc_user_t *) bu->ui_data; 254 irc_t *irc = (irc_t *) bee->ui_data; 254 255 char *s; 255 256 … … 265 266 if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) ) 266 267 { 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 );272 270 } 273 271 … … 615 613 } 616 614 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 else627 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 GTalk635 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 room651 himself but got invited, it's temporary, so make this a652 temporary mapping that is removed as soon as we /PART. */653 chan->flags |= IRC_CHANNEL_TEMP;654 }655 else656 {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 674 615 /* IRC->IM */ 675 616 static gboolean bee_irc_channel_chat_privmsg_cb( gpointer data, gint fd, b_input_condition cond ); … … 968 909 bee_irc_chat_topic, 969 910 bee_irc_chat_name_hint, 970 bee_irc_chat_invite,971 911 972 912 bee_irc_ft_in_start, -
irc_send.c
rf5c0d8e r8358691 264 264 void irc_send_who( irc_t *irc, GSList *l, const char *channel ) 265 265 { 266 gboolean is_channel = strc hr( CTYPES, channel[0] ) != NULL;266 gboolean is_channel = strcmp( channel, "**" ) != 0; 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 is_channel ? channel: "*", iu->user, iu->host, irc->root->host,275 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
rf5c0d8e r8358691 30 30 31 31 distclean: clean $(subdirs) 32 rm -rf .depend33 32 34 33 ### MAIN PROGRAM … … 43 42 @echo '*' Compiling $< 44 43 @$(CC) -c $(CFLAGS) $< -o $@ 45 46 -include .depend/*.d -
protocols/Makefile
rf5c0d8e r8358691 40 40 41 41 distclean: clean $(subdirs) 42 rm -rf .depend43 42 44 43 $(subdirs): … … 56 55 @echo '*' Compiling $< 57 56 @$(CC) -c $(CFLAGS) $< -o $@ 58 59 -include .depend/*.d -
protocols/bee.h
rf5c0d8e r8358691 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 );126 125 127 126 struct file_transfer* (*ft_in_start)( bee_t *bee, bee_user_t *bu, const char *file_name, size_t file_size ); … … 176 175 G_MODULE_EXPORT int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags ); 177 176 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 );179 177 180 178 #endif /* __BEE_H__ */ -
protocols/bee_chat.c
rf5c0d8e r8358691 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
rf5c0d8e r8358691 30 30 31 31 distclean: clean 32 rm -rf .depend33 32 34 33 ### MAIN PROGRAM … … 43 42 @echo '*' Linking jabber_mod.o 44 43 @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o 45 46 -include .depend/*.d -
protocols/jabber/jabber.h
rf5c0d8e r8358691 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 probably62 showed it already. */63 61 } jabber_buddy_flags_t; 64 62 -
protocols/jabber/message.c
rf5c0d8e r8358691 31 31 struct xt_node *body = xt_find_node( node->children, "body" ), *c; 32 32 struct jabber_buddy *bud = NULL; 33 char *s , *room = NULL, *reason = NULL;33 char *s; 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" ) ;55 struct xt_node *inv ;54 char *ns = xt_find_attr( c, "xmlns" ), *room; 55 struct xt_node *inv, *reason; 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 which61 will be passed to imcb_chat_invite() below. */62 60 room = from; 63 61 if( ( from = xt_find_attr( inv, "from" ) ) == NULL ) 64 62 from = room; 65 if( ( inv = xt_find_node( inv->children, "reason" ) ) && inv->text_len > 0 ) 66 reason = inv->text; 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 ); 67 67 } 68 68 } … … 93 93 } 94 94 } 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 && 96 ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) ) 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) 97 96 { 98 97 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 uses105 this for anything useful anyway, except GMail when people reply to an106 e-mail via chat, repeating the same subject all the time. I don't want107 to have to remember full subject strings for everyone. */108 bud->flags &= ~JBFLAG_HIDE_SUBJECT;109 98 } 110 99 … … 115 104 imcb_buddy_msg( ic, from, fullmsg->str, 116 105 0, jabber_get_timestamp( node ) ); 117 if( room )118 imcb_chat_invite( ic, room, from, reason );119 106 120 107 g_string_free( fullmsg, TRUE ); -
protocols/jabber/si.c
rf5c0d8e r8358691 262 262 break; 263 263 } 264 else265 {266 c = c->next;267 }268 264 269 265 if ( !requestok ) -
protocols/msn/Makefile
rf5c0d8e r8358691 30 30 31 31 distclean: clean 32 rm -rf .depend33 32 34 33 ### MAIN PROGRAM … … 43 42 @echo '*' Linking msn_mod.o 44 43 @$(LD) $(LFLAGS) $(objects) -o msn_mod.o 44 45 45 46 -include .depend/*.d -
protocols/oscar/Makefile
rf5c0d8e r8358691 31 31 32 32 distclean: clean 33 rm -rf .depend34 33 35 34 ### MAIN PROGRAM … … 44 43 @echo '*' Linking oscar_mod.o 45 44 @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o 46 47 -include .depend/*.d -
protocols/oscar/oscar.c
rf5c0d8e r8358691 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 }527 519 // plugin_event(event_error, (void *)980, 0, 0, 0); 528 520 break; -
protocols/purple/Makefile
rf5c0d8e r8358691 31 31 32 32 distclean: clean 33 rm -rf .depend34 33 35 34 ### MAIN PROGRAM … … 44 43 @echo '*' Linking purple_mod.o 45 44 $(LD) $(LFLAGS) $(objects) -o purple_mod.o 46 47 -include .depend/*.d -
protocols/twitter/Makefile
rf5c0d8e r8358691 30 30 31 31 distclean: clean 32 rm -rf .depend33 32 34 33 ### MAIN PROGRAM … … 44 43 @$(LD) $(LFLAGS) $(objects) -o twitter_mod.o 45 44 46 -include .depend/*.d 45 -
protocols/twitter/twitter.c
rf5c0d8e r8358691 195 195 s = set_add( &acc->set, "message_length", "140", set_eval_int, acc ); 196 196 197 s = set_add( &acc->set, "mode", " chat", set_eval_mode, acc );197 s = set_add( &acc->set, "mode", "one", set_eval_mode, acc ); 198 198 s->flags |= ACC_SET_OFFLINE_ONLY; 199 199 -
protocols/yahoo/Makefile
rf5c0d8e r8358691 31 31 32 32 distclean: clean 33 rm -rf .depend34 33 35 34 ### MAIN PROGRAM … … 44 43 @echo '*' Linking yahoo_mod.o 45 44 @$(LD) $(LFLAGS) $(objects) -o yahoo_mod.o 46 47 -include .depend/*.d -
protocols/yahoo/libyahoo2.c
rf5c0d8e r8358691 2169 2169 yd->buddies = y_list_append(yd->buddies, bud); 2170 2170 2171 #if 02172 /* BitlBee: This seems to be wrong in my experience. I think:2173 status = 0: Success2174 status = 2: Already on list2175 status = 3: Doesn't exist2176 status = 42: Invalid handle (possibly banned/reserved, I get it for2177 handles like joe or jjjjjj)2178 Haven't seen others yet. But whenever the add is successful, there2179 will be a separate "went online" packet when the auth. request is2180 accepted. Couldn't find any test account that doesn't require auth.2181 unfortunately (if there is even such a thing?) */2182 2183 2171 /* A non-zero status (i've seen 2) seems to mean the buddy is already 2184 2172 * added and is online */ … … 2188 2176 YAHOO_CALLBACK(ext_yahoo_status_changed) (yd->client_id, who, 2189 2177 YAHOO_STATUS_AVAILABLE, NULL, 0, 0, 0); 2190 }2191 #endif2192 /* 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);2197 2178 } 2198 2179 } -
root_commands.c
rf5c0d8e r8358691 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 1291 1286 /* Maybe this should be a stand-alone command as well? */ 1292 1287 static void bitlbee_whatsnew( irc_t *irc ) … … 1343 1338 { "identify", 1, cmd_identify, 0 }, 1344 1339 { "info", 1, cmd_info, 0 }, 1345 { "nick", 1, cmd_nick, 0 },1346 1340 { "no", 0, cmd_yesno, 0 }, 1347 1341 { "qlist", 0, cmd_qlist, 0 }, -
utils/README
rf5c0d8e r8358691 18 18 19 19 20 * c onvert_purple.py20 * create_nicksfile.pl (Christian Friedl <christian.friedl@chello.at>) 21 21 22 Converts libpurple configs into something BitlBee can use, so you don't 23 have to re-add all your accounts by hand. 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. 24 47 25 48
Note: See TracChangeset
for help on using the changeset viewer.