Index: irc_im.c
===================================================================
--- irc_im.c	(revision 704dd38a1440dc9d614df9222d6196048226622c)
+++ irc_im.c	(revision ad404ab26aa3cfdfc3c76f6926e556e333d02753)
@@ -65,4 +65,14 @@
 	if( set_getbool( &bee->set, "private" ) )
 		iu->flags |= IRC_USER_PRIVATE;
+	
+	if( bu->flags & BEE_USER_LOCAL )
+	{
+		char *s = set_getstr( &bee->set, "handle_unknown" );
+		
+		if( strcmp( s, "add_private" ) == 0 )
+			iu->flags |= IRC_USER_PRIVATE;
+		else if( strcmp( s, "add_channel" ) == 0 )
+			iu->flags &= ~IRC_USER_PRIVATE;
+	}
 	
 	iu->f = &irc_user_im_funcs;
Index: protocols/bee.h
===================================================================
--- protocols/bee.h	(revision 704dd38a1440dc9d614df9222d6196048226622c)
+++ protocols/bee.h	(revision ad404ab26aa3cfdfc3c76f6926e556e333d02753)
@@ -54,4 +54,5 @@
 	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;
 
@@ -107,5 +108,5 @@
 
 /* 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 );
Index: protocols/bee_chat.c
===================================================================
--- protocols/bee_chat.c	(revision 704dd38a1440dc9d614df9222d6196048226622c)
+++ protocols/bee_chat.c	(revision ad404ab26aa3cfdfc3c76f6926e556e333d02753)
@@ -160,5 +160,5 @@
 	   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 */
Index: protocols/bee_user.c
===================================================================
--- protocols/bee_user.c	(revision 704dd38a1440dc9d614df9222d6196048226622c)
+++ protocols/bee_user.c	(revision ad404ab26aa3cfdfc3c76f6926e556e333d02753)
@@ -27,5 +27,5 @@
 #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;
@@ -37,4 +37,5 @@
 	bu->bee = bee;
 	bu->ic = ic;
+	bu->flags = flags;
 	bu->handle = g_strdup( handle );
 	bee->users = g_slist_prepend( bee->users, bu );
@@ -160,5 +161,5 @@
 		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
@@ -208,5 +209,5 @@
 		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 );
 		}
 	}
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision 704dd38a1440dc9d614df9222d6196048226622c)
+++ protocols/nogaim.c	(revision ad404ab26aa3cfdfc3c76f6926e556e333d02753)
@@ -376,5 +376,5 @@
 	
 	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 );
Index: root_commands.c
===================================================================
--- root_commands.c	(revision 704dd38a1440dc9d614df9222d6196048226622c)
+++ root_commands.c	(revision ad404ab26aa3cfdfc3c76f6926e556e333d02753)
@@ -532,5 +532,5 @@
 		/* Only for add -tmp. For regular adds, this callback will
 		   be called once the IM server confirms. */
-		bee_user_new( irc->b, a->ic, cmd[2] );
+		bee_user_new( irc->b, a->ic, cmd[2], BEE_USER_LOCAL );
 	
 	irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2]  );
