Changeset ad404ab


Ignore:
Timestamp:
2010-06-03T00:20:53Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
7b71feb
Parents:
704dd38
Message:

Restore add_* handle_unknown settings.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r704dd38 rad404ab  
    6565        if( set_getbool( &bee->set, "private" ) )
    6666                iu->flags |= IRC_USER_PRIVATE;
     67       
     68        if( bu->flags & BEE_USER_LOCAL )
     69        {
     70                char *s = set_getstr( &bee->set, "handle_unknown" );
     71               
     72                if( strcmp( s, "add_private" ) == 0 )
     73                        iu->flags |= IRC_USER_PRIVATE;
     74                else if( strcmp( s, "add_channel" ) == 0 )
     75                        iu->flags &= ~IRC_USER_PRIVATE;
     76        }
    6777       
    6878        iu->f = &irc_user_im_funcs;
  • protocols/bee.h

    r704dd38 rad404ab  
    5454        BEE_USER_ONLINE = 1,    /* Compatibility with old OPT_LOGGED_IN flag */
    5555        BEE_USER_AWAY = 4,      /* Compatibility with old OPT_AWAY flag */
     56        BEE_USER_LOCAL = 256,   /* Locally-added contacts (not in real contact list) */
    5657} bee_user_flags_t;
    5758
     
    107108
    108109/* bee_user.c */
    109 bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle );
     110bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle, bee_user_flags_t flags );
    110111int bee_user_free( bee_t *bee, bee_user_t *bu );
    111112bee_user_t *bee_user_by_handle( bee_t *bee, struct im_connection *ic, const char *handle );
  • protocols/bee_chat.c

    r704dd38 rad404ab  
    160160           your contact list. Try to handle that here */
    161161        if( !me && !bu )
    162                 bu = bee_user_new( bee, ic, handle );
     162                bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );
    163163       
    164164        /* Add the handle to the room userlist */
  • protocols/bee_user.c

    r704dd38 rad404ab  
    2727#include "bitlbee.h"
    2828
    29 bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle )
     29bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle, bee_user_flags_t flags )
    3030{
    3131        bee_user_t *bu;
     
    3737        bu->bee = bee;
    3838        bu->ic = ic;
     39        bu->flags = flags;
    3940        bu->handle = g_strdup( handle );
    4041        bee->users = g_slist_prepend( bee->users, bu );
     
    160161                if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 )
    161162                {
    162                         bu = bee_user_new( bee, ic, handle );
     163                        bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );
    163164                }
    164165                else
     
    208209                else if( g_strncasecmp( h, "add", 3 ) == 0 )
    209210                {
    210                         bu = bee_user_new( bee, ic, handle );
     211                        bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );
    211212                }
    212213        }
  • protocols/nogaim.c

    r704dd38 rad404ab  
    376376       
    377377        if( !( bu = bee_user_by_handle( bee, ic, handle ) ) )
    378                 bu = bee_user_new( bee, ic, handle );
     378                bu = bee_user_new( bee, ic, handle, 0 );
    379379       
    380380        bu->group = bee_group_by_name( bee, group, TRUE );
  • root_commands.c

    r704dd38 rad404ab  
    532532                /* Only for add -tmp. For regular adds, this callback will
    533533                   be called once the IM server confirms. */
    534                 bee_user_new( irc->b, a->ic, cmd[2] );
     534                bee_user_new( irc->b, a->ic, cmd[2], BEE_USER_LOCAL );
    535535       
    536536        irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2]  );
Note: See TracChangeset for help on using the changeset viewer.