Changes in / [f5c0d8e:8358691]


Ignore:
Files:
3 added
1 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    rf5c0d8e r8358691  
    2020bitlbee.info
    2121bitlbee.exe
    22 .depend
  • Makefile

    rf5c0d8e r8358691  
    5252
    5353distclean: clean $(subdirs)
    54         rm -rf .depend
    5554        rm -f Makefile.settings config.h bitlbee.pc
    5655        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
    5956        $(MAKE) -C tests distclean
    6057
     
    108105        x=$$(basename $$(pwd)); \
    109106        cd ..; \
    110         tar czf $$x.tar.gz --exclude=debian --exclude=.bzr* --exclude=.depend $$x
     107        tar czf $$x.tar.gz --exclude=debian --exclude=.bzr* $$x
    111108
    112109$(subdirs):
     
    134131helloworld:
    135132        @echo Hello World
    136 
    137 -include .depend/*.d
  • configure

    rf5c0d8e r8358691  
    595595fi
    596596
    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 
    605597if [ "$msn" = 0 ]; then
    606598        echo '#undef WITH_MSN' >> config.h
  • doc/user-guide/commands.xml

    rf5c0d8e r8358691  
    7373                                       
    7474                                        <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>).
    7676                                        </para>
    7777                                       
     
    970970        <bitlbee-setting name="mode" type="string" scope="account">
    971971                <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.
    989985                        </para>
    990986                </description>
     
    16411637        </bitlbee-command>
    16421638       
    1643         <bitlbee-command name="transfer">
     1639        <bitlbee-command name="transfers">
    16441640                <short-description>Monitor, cancel, or reject file transfers</short-description>
    1645                 <syntax>transfer [&lt;cancel&gt; id | &lt;reject&gt;]</syntax>
     1641                <syntax>transfers [&lt;cancel&gt; id | &lt;reject&gt;]</syntax>
    16461642               
    16471643                <description>
    16481644                        <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 &lt;action&gt;</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 &lt;action&gt;</emphasis> for more information.
    16501646                        </para>
    16511647
    16521648                        <ircexample>
    1653                                 <ircline nick="ulim">transfer</ircline>
     1649                                <ircline nick="ulim">transfers</ircline>
    16541650                        </ircexample>
    16551651                </description>
     
    16571653                <bitlbee-command name="cancel">
    16581654                        <short-description>Cancels the file transfer with the given id</short-description>
    1659                         <syntax>transfer &lt;cancel&gt; id</syntax>
     1655                        <syntax>transfers &lt;cancel&gt; id</syntax>
    16601656
    16611657                        <description>
     
    16641660
    16651661                        <ircexample>
    1666                                 <ircline nick="ulim">transfer cancel 1</ircline>
     1662                                <ircline nick="ulim">transfers cancel 1</ircline>
    16671663                                <ircline nick="root">Canceling file transfer for test</ircline>
    16681664                        </ircexample>
     
    16711667                <bitlbee-command name="reject">
    16721668                        <short-description>Rejects all incoming transfers</short-description>
    1673                         <syntax>transfer &lt;reject&gt;</syntax>
     1669                        <syntax>transfers &lt;reject&gt;</syntax>
    16741670
    16751671                        <description>
     
    16781674
    16791675                        <ircexample>
    1680                                 <ircline nick="ulim">transfer reject</ircline>
     1676                                <ircline nick="ulim">transfers reject</ircline>
    16811677                        </ircexample>
    16821678                </bitlbee-command>
  • irc.h

    rf5c0d8e r8358691  
    289289void irc_send_channel_user_mode_diff( irc_channel_t *ic, irc_user_t *iu,
    290290                                      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 );
    292291
    293292/* irc_user.c */
  • irc_commands.c

    rf5c0d8e r8358691  
    302302        char *channel = cmd[1];
    303303        irc_channel_t *ic;
    304         irc_user_t *iu;
    305304       
    306305        if( !channel || *channel == '0' || *channel == '*' || !*channel )
     
    308307        else if( ( ic = irc_channel_by_name( irc, channel ) ) )
    309308                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         }
    317309        else
    318310                irc_send_num( irc, 403, "%s :No such channel", channel );
  • irc_im.c

    rf5c0d8e r8358691  
    252252{
    253253        irc_user_t *iu = (irc_user_t *) bu->ui_data;
     254        irc_t *irc = (irc_t *) bee->ui_data;
    254255        char *s;
    255256       
     
    265266        if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) )
    266267        {
    267                 /* People don't like this /NOTICE. Meh, let's go back to the old one.
    268268                char *msg = g_strdup_printf( "<< \002BitlBee\002 - Changed name to `%s' >>", iu->fullname );
    269269                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 );
    272270        }
    273271       
     
    615613}
    616614
    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 
    674615/* IRC->IM */
    675616static gboolean bee_irc_channel_chat_privmsg_cb( gpointer data, gint fd, b_input_condition cond );
     
    968909        bee_irc_chat_topic,
    969910        bee_irc_chat_name_hint,
    970         bee_irc_chat_invite,
    971911       
    972912        bee_irc_ft_in_start,
  • irc_send.c

    rf5c0d8e r8358691  
    264264void irc_send_who( irc_t *irc, GSList *l, const char *channel )
    265265{
    266         gboolean is_channel = strchr( CTYPES, channel[0] ) != NULL;
     266        gboolean is_channel = strcmp( channel, "**" ) != 0;
    267267       
    268268        while( l )
     
    273273                /* TODO(wilmer): Restore away/channel information here */
    274274                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,
    276276                              iu->nick, iu->flags & IRC_USER_AWAY ? 'G' : 'H',
    277277                              iu->fullname );
     
    398398                irc_write( ic->irc, ":%s MODE %s %s", from, ic->name, changes );
    399399}
    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  
    3030
    3131distclean: clean $(subdirs)
    32         rm -rf .depend
    3332
    3433### MAIN PROGRAM
     
    4342        @echo '*' Compiling $<
    4443        @$(CC) -c $(CFLAGS) $< -o $@
    45 
    46 -include .depend/*.d
  • protocols/Makefile

    rf5c0d8e r8358691  
    4040
    4141distclean: clean $(subdirs)
    42         rm -rf .depend
    4342
    4443$(subdirs):
     
    5655        @echo '*' Compiling $<
    5756        @$(CC) -c $(CFLAGS) $< -o $@
    58 
    59 -include .depend/*.d
  • protocols/bee.h

    rf5c0d8e r8358691  
    123123        gboolean (*chat_topic)( bee_t *bee, struct groupchat *c, const char *new, bee_user_t *bu );
    124124        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 );
    126125       
    127126        struct file_transfer* (*ft_in_start)( bee_t *bee, bee_user_t *bu, const char *file_name, size_t file_size );
     
    176175G_MODULE_EXPORT int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags );
    177176G_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 );
    179177
    180178#endif /* __BEE_H__ */
  • protocols/bee_chat.c

    rf5c0d8e r8358691  
    233233        return NULL;
    234234}
    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  
    3030
    3131distclean: clean
    32         rm -rf .depend
    3332
    3433### MAIN PROGRAM
     
    4342        @echo '*' Linking jabber_mod.o
    4443        @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o
    45 
    46 -include .depend/*.d
  • protocols/jabber/jabber.h

    rf5c0d8e r8358691  
    5959        JBFLAG_IS_ANONYMOUS = 8,        /* For anonymous chatrooms, when we don't have
    6060                                           have a real JID. */
    61         JBFLAG_HIDE_SUBJECT = 16,       /* Hide the subject field since we probably
    62                                            showed it already. */
    6361} jabber_buddy_flags_t;
    6462
  • protocols/jabber/message.c

    rf5c0d8e r8358691  
    3131        struct xt_node *body = xt_find_node( node->children, "body" ), *c;
    3232        struct jabber_buddy *bud = NULL;
    33         char *s, *room = NULL, *reason = NULL;
     33        char *s;
    3434       
    3535        if( !from )
     
    5252                for( c = node->children; ( c = xt_find_node( c, "x" ) ); c = c->next )
    5353                {
    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;
    5656                       
    5757                        if( ns && strcmp( ns, XMLNS_MUC_USER ) == 0 &&
    5858                            ( inv = xt_find_node( c->children, "invite" ) ) )
    5959                        {
    60                                 /* This is an invitation. Set some vars which
    61                                    will be passed to imcb_chat_invite() below. */
    6260                                room = from;
    6361                                if( ( from = xt_find_attr( inv, "from" ) ) == NULL )
    6462                                        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 );
    6767                        }
    6868                }
     
    9393                        }
    9494                }
    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 )
    9796                {
    9897                        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;
    10998                }
    11099               
     
    115104                        imcb_buddy_msg( ic, from, fullmsg->str,
    116105                                        0, jabber_get_timestamp( node ) );
    117                 if( room )
    118                         imcb_chat_invite( ic, room, from, reason );
    119106               
    120107                g_string_free( fullmsg, TRUE );
  • protocols/jabber/si.c

    rf5c0d8e r8358691  
    262262                                break;
    263263                        }
    264                         else
    265                         {
    266                                 c = c->next;
    267                         }
    268264
    269265                if ( !requestok )
  • protocols/msn/Makefile

    rf5c0d8e r8358691  
    3030
    3131distclean: clean
    32         rm -rf .depend
    3332
    3433### MAIN PROGRAM
     
    4342        @echo '*' Linking msn_mod.o
    4443        @$(LD) $(LFLAGS) $(objects) -o msn_mod.o
     44       
    4545
    46 -include .depend/*.d
  • protocols/oscar/Makefile

    rf5c0d8e r8358691  
    3131
    3232distclean: clean
    33         rm -rf .depend
    3433
    3534### MAIN PROGRAM
     
    4443        @echo '*' Linking oscar_mod.o
    4544        @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o
    46 
    47 -include .depend/*.d
  • protocols/oscar/oscar.c

    rf5c0d8e r8358691  
    517517                        /* Incorrect nick/password */
    518518                        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                         }
    527519//                      plugin_event(event_error, (void *)980, 0, 0, 0);
    528520                        break;
  • protocols/purple/Makefile

    rf5c0d8e r8358691  
    3131
    3232distclean: clean
    33         rm -rf .depend
    3433
    3534### MAIN PROGRAM
     
    4443        @echo '*' Linking purple_mod.o
    4544        $(LD) $(LFLAGS) $(objects) -o purple_mod.o
    46 
    47 -include .depend/*.d
  • protocols/twitter/Makefile

    rf5c0d8e r8358691  
    3030
    3131distclean: clean
    32         rm -rf .depend
    3332
    3433### MAIN PROGRAM
     
    4443        @$(LD) $(LFLAGS) $(objects) -o twitter_mod.o
    4544       
    46 -include .depend/*.d
     45
  • protocols/twitter/twitter.c

    rf5c0d8e r8358691  
    195195        s = set_add( &acc->set, "message_length", "140", set_eval_int, acc );
    196196       
    197         s = set_add( &acc->set, "mode", "chat", set_eval_mode, acc );
     197        s = set_add( &acc->set, "mode", "one", set_eval_mode, acc );
    198198        s->flags |= ACC_SET_OFFLINE_ONLY;
    199199       
  • protocols/yahoo/Makefile

    rf5c0d8e r8358691  
    3131
    3232distclean: clean
    33         rm -rf .depend
    3433
    3534### MAIN PROGRAM
     
    4443        @echo '*' Linking yahoo_mod.o
    4544        @$(LD) $(LFLAGS) $(objects) -o yahoo_mod.o
    46 
    47 -include .depend/*.d
  • protocols/yahoo/libyahoo2.c

    rf5c0d8e r8358691  
    21692169        yd->buddies = y_list_append(yd->buddies, bud);
    21702170
    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            
    21832171        /* A non-zero status (i've seen 2) seems to mean the buddy is already
    21842172         * added and is online */
     
    21882176                YAHOO_CALLBACK(ext_yahoo_status_changed) (yd->client_id, who,
    21892177                        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);
    21972178        }
    21982179}
  • root_commands.c

    rf5c0d8e r8358691  
    12841284}
    12851285
    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 
    12911286/* Maybe this should be a stand-alone command as well? */
    12921287static void bitlbee_whatsnew( irc_t *irc )
     
    13431338        { "identify",       1, cmd_identify,       0 },
    13441339        { "info",           1, cmd_info,           0 },
    1345         { "nick",           1, cmd_nick,           0 },
    13461340        { "no",             0, cmd_yesno,          0 },
    13471341        { "qlist",          0, cmd_qlist,          0 },
  • utils/README

    rf5c0d8e r8358691  
    1818
    1919
    20 * convert_purple.py
     20* create_nicksfile.pl (Christian Friedl <christian.friedl@chello.at>)
    2121
    22 Converts libpurple configs into something BitlBee can use, so you don't
    23 have to re-add all your accounts by hand.
     22This program reads your ~/.licq/ configuration data and convert it to a
     23correct .nicks file. This program can be extended to read other contact
     24list file formats as well.
     25
     26
     27* centericq2bitlbee.sh (geno <geno@xenyon.com>)
     28
     29Converter script for CenterICQ ICQ contact lists. See the documentation
     30for more information.
     31
     32
     33* convert_gnomeicu.txt
     34
     35Not a program, but this one contains a regex which should correctly
     36convert GnomeICU configuration files into the BitlBee format.
     37
     38
     39* Dynamic MOTD for BitlBee (Geert Hauwaerts <geert@hauwaerts.be>)
     40
     41Originally, I wanted to put this program here, but Geert put it online
     42on his own server, with docs and stuff, so I guess it's better to put
     43a link here. dmotd is a little script which generates a motd with some
     44nice statistics, especially nice for servers with many people on it.
     45
     46See http://dmotd.hauwaerts.be/ for more information.
    2447
    2548
Note: See TracChangeset for help on using the changeset viewer.