diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-03 01:20:53 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-03 01:20:53 +0100 | 
| commit | ad404ab26aa3cfdfc3c76f6926e556e333d02753 (patch) | |
| tree | 162f7b2a63e79c6b0580fa3de63b8274d17e0c99 /protocols | |
| parent | 704dd38a1440dc9d614df9222d6196048226622c (diff) | |
Restore add_* handle_unknown settings.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/bee.h | 3 | ||||
| -rw-r--r-- | protocols/bee_chat.c | 2 | ||||
| -rw-r--r-- | protocols/bee_user.c | 7 | ||||
| -rw-r--r-- | protocols/nogaim.c | 2 | 
4 files changed, 8 insertions, 6 deletions
| diff --git a/protocols/bee.h b/protocols/bee.h index 100593f9..e421db57 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -53,6 +53,7 @@ typedef enum  {  	BEE_USER_ONLINE = 1,    /* Compatibility with old OPT_LOGGED_IN flag */  	BEE_USER_AWAY = 4,      /* Compatibility with old OPT_AWAY flag */ +	BEE_USER_LOCAL = 256,   /* Locally-added contacts (not in real contact list) */  } bee_user_flags_t;  typedef struct bee_user @@ -106,7 +107,7 @@ bee_t *bee_new();  void bee_free( bee_t *b );  /* bee_user.c */ -bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle ); +bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle, bee_user_flags_t flags );  int bee_user_free( bee_t *bee, bee_user_t *bu );  bee_user_t *bee_user_by_handle( bee_t *bee, struct im_connection *ic, const char *handle );  int bee_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, int flags ); diff --git a/protocols/bee_chat.c b/protocols/bee_chat.c index 3e17a42f..3be6f189 100644 --- a/protocols/bee_chat.c +++ b/protocols/bee_chat.c @@ -159,7 +159,7 @@ void imcb_chat_add_buddy( struct groupchat *c, const char *handle )  	/* Most protocols allow people to join, even when they're not in  	   your contact list. Try to handle that here */  	if( !me && !bu ) -		bu = bee_user_new( bee, ic, handle ); +		bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );  	/* Add the handle to the room userlist */  	/* TODO: Use bu instead of a string */ diff --git a/protocols/bee_user.c b/protocols/bee_user.c index b1dcffc8..fd2e8635 100644 --- a/protocols/bee_user.c +++ b/protocols/bee_user.c @@ -26,7 +26,7 @@  #define BITLBEE_CORE  #include "bitlbee.h" -bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle ) +bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle, bee_user_flags_t flags )  {  	bee_user_t *bu; @@ -36,6 +36,7 @@ bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *hand  	bu = g_new0( bee_user_t, 1 );  	bu->bee = bee;  	bu->ic = ic; +	bu->flags = flags;  	bu->handle = g_strdup( handle );  	bee->users = g_slist_prepend( bee->users, bu ); @@ -159,7 +160,7 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags,  	{  		if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 )  		{ -			bu = bee_user_new( bee, ic, handle ); +			bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );  		}  		else  		{ @@ -207,7 +208,7 @@ void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, ui  		}  		else if( g_strncasecmp( h, "add", 3 ) == 0 )  		{ -			bu = bee_user_new( bee, ic, handle ); +			bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );  		}  	} diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 241c9833..00fe0ebf 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -375,7 +375,7 @@ void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *g  	bee_t *bee = ic->bee;  	if( !( bu = bee_user_by_handle( bee, ic, handle ) ) ) -		bu = bee_user_new( bee, ic, handle ); +		bu = bee_user_new( bee, ic, handle, 0 );  	bu->group = bee_group_by_name( bee, group, TRUE );  } | 
