Index: protocols/Makefile
===================================================================
--- protocols/Makefile	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/Makefile	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -10,6 +10,5 @@
 
 # [SH] Program variables
-#objects = account.o nogaim.o user.o
-objects = bee.o bee_user.o nogaim.o
+objects = account.o bee.o bee_user.o nogaim.o
 
 
Index: protocols/account.c
===================================================================
--- protocols/account.c	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/account.c	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -29,17 +29,17 @@
 #include "chat.h"
 
-account_t *account_add( irc_t *irc, struct prpl *prpl, char *user, char *pass )
+account_t *account_add( bee_t *bee, struct prpl *prpl, char *user, char *pass )
 {
 	account_t *a;
 	set_t *s;
 	
-	if( irc->accounts )
-	{
-		for( a = irc->accounts; a->next; a = a->next );
+	if( bee->accounts )
+	{
+		for( a = bee->accounts; a->next; a = a->next );
 		a = a->next = g_new0( account_t, 1 );
 	}
 	else
 	{
-		irc->accounts = a = g_new0 ( account_t, 1 );
+		bee->accounts = a = g_new0 ( account_t, 1 );
 	}
 	
@@ -48,5 +48,5 @@
 	a->pass = g_strdup( pass );
 	a->auto_connect = 1;
-	a->irc = irc;
+	a->bee = bee;
 	
 	s = set_add( &a->set, "auto_connect", "true", set_eval_account, a );
@@ -153,5 +153,5 @@
 }
 
-account_t *account_get( irc_t *irc, char *id )
+account_t *account_get( bee_t *bee, char *id )
 {
 	account_t *a, *ret = NULL;
@@ -169,5 +169,5 @@
 		if( ( proto = find_protocol( id ) ) )
 		{
-			for( a = irc->accounts; a; a = a->next )
+			for( a = bee->accounts; a; a = a->next )
 				if( a->prpl == proto &&
 				    a->prpl->handle_cmp( handle, a->user ) == 0 )
@@ -186,5 +186,5 @@
 	if( sscanf( id, "%d", &nr ) == 1 && nr < 1000 )
 	{
-		for( a = irc->accounts; a; a = a->next )
+		for( a = bee->accounts; a; a = a->next )
 			if( ( nr-- ) == 0 )
 				return( a );
@@ -193,5 +193,5 @@
 	}
 	
-	for( a = irc->accounts; a; a = a->next )
+	for( a = bee->accounts; a; a = a->next )
 	{
 		if( g_strcasecmp( id, a->prpl->name ) == 0 )
@@ -214,5 +214,5 @@
 }
 
-void account_del( irc_t *irc, account_t *acc )
+void account_del( bee_t *bee, account_t *acc )
 {
 	account_t *a, *l = NULL;
@@ -223,5 +223,5 @@
 		return;
 	
-	for( a = irc->accounts; a; a = (l=a)->next )
+	for( a = bee->accounts; a; a = (l=a)->next )
 		if( a == acc )
 		{
@@ -229,12 +229,14 @@
 				l->next = a->next;
 			else
-				irc->accounts = a->next;
-			
-			for( c = irc->chatrooms; c; c = nc )
+				bee->accounts = a->next;
+			
+			/** FIXME
+			for( c = bee->chatrooms; c; c = nc )
 			{
 				nc = c->next;
 				if( acc == c->acc )
-					chat_del( irc, c );
+					chat_del( bee, c );
 			}
+			*/
 			
 			while( a->set )
@@ -254,5 +256,5 @@
 }
 
-void account_on( irc_t *irc, account_t *a )
+void account_on( bee_t *bee, account_t *a )
 {
 	if( a->ic )
@@ -268,5 +270,5 @@
 }
 
-void account_off( irc_t *irc, account_t *a )
+void account_off( bee_t *bee, account_t *a )
 {
 	imc_logout( a->ic, FALSE );
@@ -336,5 +338,5 @@
 int account_reconnect_delay( account_t *a )
 {
-	char *setting = set_getstr( &a->irc->b->set, "auto_reconnect_delay" );
+	char *setting = set_getstr( &a->bee->set, "auto_reconnect_delay" );
 	struct account_reconnect_delay p;
 	
Index: protocols/account.h
===================================================================
--- protocols/account.h	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/account.h	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -42,14 +42,14 @@
 	GHashTable *nicks;
 	
-	struct irc *irc;
+	struct bee *bee;
 	struct im_connection *ic;
 	struct account *next;
 } account_t;
 
-account_t *account_add( irc_t *irc, struct prpl *prpl, char *user, char *pass );
-account_t *account_get( irc_t *irc, char *id );
-void account_del( irc_t *irc, account_t *acc );
-void account_on( irc_t *irc, account_t *a );
-void account_off( irc_t *irc, account_t *a );
+account_t *account_add( bee_t *bee, struct prpl *prpl, char *user, char *pass );
+account_t *account_get( bee_t *bee, char *id );
+void account_del( bee_t *bee, account_t *acc );
+void account_on( bee_t *bee, account_t *a );
+void account_off( bee_t *bee, account_t *a );
 
 char *set_eval_account( set_t *set, char *value );
Index: protocols/bee.c
===================================================================
--- protocols/bee.c	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/bee.c	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -24,24 +24,24 @@
 void bee_free( bee_t *b )
 {
-	while( b->accounts )
+	account_t *acc = b->accounts;
+	
+	while( acc )
 	{
-		account_t *acc = b->accounts->data;
-		
-		/*
 		if( acc->ic )
 			imc_logout( acc->ic, FALSE );
 		else if( acc->reconnect )
 			cancel_auto_reconnect( acc );
-		*/
 		
 		if( acc->ic == NULL )
-			{} //account_del( b, acc );
+			account_del( b, acc );
 		else
 			/* Nasty hack, but account_del() doesn't work in this
 			   case and we don't want infinite loops, do we? ;-) */
-			b->accounts = g_slist_remove( b->accounts, acc );
+			acc = acc->next;
 	}
 	
 	while( b->set )
 		set_del( &b->set, b->set->key );
+	
+	g_free( b );
 }
Index: protocols/bee.h
===================================================================
--- protocols/bee.h	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/bee.h	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -34,5 +34,5 @@
 	
 	GSList *users;
-	GSList *accounts;
+	struct account *accounts; /* TODO(wilmer): Use GSList here too? */
 	
 	const struct bee_ui_funcs *ui;
@@ -56,5 +56,6 @@
 	char *group;
 
-	char *away;
+	bee_user_flags_t flags;
+	char *status;
 	char *status_msg;
 	
@@ -67,4 +68,5 @@
 	gboolean (*user_new)( bee_t *bee, struct bee_user *bu );
 	gboolean (*user_free)( bee_t *bee, struct bee_user *bu );
+	gboolean (*user_status)( bee_t *bee, struct bee_user *bu, struct bee_user *old );
 } bee_ui_funcs_t;
 
Index: protocols/bee_user.c
===================================================================
--- protocols/bee_user.c	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/bee_user.c	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -59,5 +59,5 @@
 	g_free( bu->fullname );
 	g_free( bu->group );
-	g_free( bu->away );
+	g_free( bu->status );
 	g_free( bu->status_msg );
 	
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/nogaim.c	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -92,6 +92,4 @@
 #endif
 
-/* nogaim.c */
-
 GList *protocols = NULL;
   
@@ -125,5 +123,4 @@
 }
 
-/* nogaim.c */
 void nogaim_init()
 {
@@ -156,6 +153,4 @@
 GSList *get_connections() { return connections; }
 
-/* multi.c */
-
 struct im_connection *imcb_new( account_t *acc )
 {
@@ -164,5 +159,5 @@
 	ic = g_new0( struct im_connection, 1 );
 	
-	ic->irc = acc->irc;
+	ic->bee = acc->bee;
 	ic->acc = acc;
 	acc->ic = ic;
@@ -178,5 +173,5 @@
 	
 	/* Destroy the pointer to this connection from the account list */
-	for( a = ic->irc->accounts; a; a = a->next )
+	for( a = ic->bee->accounts; a; a = a->next )
 		if( a->ic == ic )
 		{
@@ -199,10 +194,10 @@
 	va_end( params );
 
-	if( ( g_strcasecmp( set_getstr( &ic->irc->b->set, "strip_html" ), "always" ) == 0 ) ||
-	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->b->set, "strip_html" ) ) )
+	if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
+	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) )
 		strip_html( text );
 	
 	/* Try to find a different connection on the same protocol. */
-	for( a = ic->irc->accounts; a; a = a->next )
+	for( a = ic->bee->accounts; a; a = a->next )
 		if( a->prpl == ic->acc->prpl && a->ic != ic )
 			break;
@@ -210,7 +205,8 @@
 	/* If we found one, include the screenname in the message. */
 	if( a )
-		irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text );
+		/* FIXME(wilmer): ui_log callback or so */
+		irc_usermsg( ic->bee->ui_data, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text );
 	else
-		irc_usermsg( ic->irc, "%s - %s", ic->acc->prpl->name, text );
+		irc_usermsg( ic->bee->ui_data, "%s - %s", ic->acc->prpl->name, text );
 	
 	g_free( text );
@@ -263,7 +259,4 @@
 void imcb_connected( struct im_connection *ic )
 {
-	irc_t *irc = ic->irc;
-	struct chat *c;
-	
 	/* MSN servers sometimes redirect you to a different server and do
 	   the whole login sequence again, so these "late" calls to this
@@ -301,5 +294,5 @@
 	
 	a->reconnect = 0;
-	account_on( a->irc, a );
+	account_on( a->bee, a );
 	
 	return( FALSE );	/* Only have to run the timeout once */
@@ -314,7 +307,7 @@
 void imc_logout( struct im_connection *ic, int allow_reconnect )
 {
-	irc_t *irc = ic->irc;
-	user_t *t, *u;
+	bee_t *bee = ic->bee;
 	account_t *a;
+	GSList *l;
 	int delay;
 	
@@ -336,20 +329,15 @@
 	ic->away = NULL;
 	
-	u = irc->users;
-	while( u )
-	{
-		if( u->ic == ic )
-		{
-			t = u->next;
-			user_del( irc, u->nick );
-			u = t;
-		}
-		else
-			u = u->next;
-	}
-	
-	query_del_by_conn( ic->irc, ic );
-	
-	for( a = irc->accounts; a; a = a->next )
+	for( l = bee->users; l; l = l->next )
+	{
+		bee_user_t *bu = l->data;
+		
+		if( bu->ic == ic )
+			bee_user_free( bee, ic, bu->handle );
+	}
+	
+	//query_del_by_conn( ic->irc, ic );
+	
+	for( a = bee->accounts; a; a = a->next )
 		if( a->ic == ic )
 			break;
@@ -359,5 +347,5 @@
 		/* Uhm... This is very sick. */
 	}
-	else if( allow_reconnect && set_getbool( &irc->b->set, "auto_reconnect" ) &&
+	else if( allow_reconnect && set_getbool( &bee->set, "auto_reconnect" ) &&
 	         set_getbool( &a->set, "auto_reconnect" ) &&
 	         ( delay = account_reconnect_delay( a ) ) > 0 )
@@ -370,25 +358,19 @@
 }
 
-
-/* dialogs.c */
-
 void imcb_ask( struct im_connection *ic, char *msg, void *data,
                query_callback doit, query_callback dont )
 {
-	query_add( ic->irc, ic, msg, doit, dont, data );
-}
-
-
-/* list.c */
+	//query_add( ic->irc, ic, msg, doit, dont, data );
+}
 
 void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group )
 {
-	user_t *u;
-	char nick[MAX_NICK_LENGTH+1], *s;
-	irc_t *irc = ic->irc;
-	
-	if( user_findhandle( ic, handle ) )
-	{
-		if( set_getbool( &irc->b->set, "debug" ) )
+	bee_user_t *bu;
+	//char nick[MAX_NICK_LENGTH+1], *s;
+	bee_t *bee = ic->bee;
+	
+	if( bee_user_by_handle( bee, ic, handle ) )
+	{
+		if( set_getbool( &bee->set, "debug" ) )
 			imcb_log( ic, "User already exists, ignoring add request: %s", handle );
 		
@@ -401,61 +383,11 @@
 	}
 	
-	memset( nick, 0, MAX_NICK_LENGTH + 1 );
-	strcpy( nick, nick_get( ic->acc, handle ) );
-	
-	u = user_add( ic->irc, nick );
-	
-//	if( !realname || !*realname ) realname = nick;
-//	u->realname = g_strdup( realname );
-	
-	if( ( s = strchr( handle, '@' ) ) )
-	{
-		u->host = g_strdup( s + 1 );
-		u->user = g_strndup( handle, s - handle );
-	}
-	else if( ic->acc->server )
-	{
-		u->host = g_strdup( ic->acc->server );
-		u->user = g_strdup( handle );
-		
-		/* s/ /_/ ... important for AOL screennames */
-		for( s = u->user; *s; s ++ )
-			if( *s == ' ' )
-				*s = '_';
-	}
-	else
-	{
-		u->host = g_strdup( ic->acc->prpl->name );
-		u->user = g_strdup( handle );
-	}
-	
-	u->ic = ic;
-	u->handle = g_strdup( handle );
-	if( group ) u->group = g_strdup( group );
-	u->send_handler = buddy_send_handler;
-	u->last_typing_notice = 0;
-}
-
-struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle )
-{
-	static struct buddy b[1];
-	user_t *u;
-	
-	u = user_findhandle( ic, handle );
-	
-	if( !u )
-		return( NULL );
-	
-	memset( b, 0, sizeof( b ) );
-	strncpy( b->name, handle, 80 );
-	strncpy( b->show, u->realname, BUDDY_ALIAS_MAXLEN );
-	b->present = u->online;
-	b->ic = u->ic;
-	
-	return( b );
+	bu = bee_user_new( bee, ic, handle );
+	bu->group = g_strdup( group );
 }
 
 void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname )
 {
+#if 0
 	user_t *u = user_findhandle( ic, handle );
 	char *set;
@@ -469,5 +401,5 @@
 		u->realname = g_strdup( realname );
 		
-		if( ( ic->flags & OPT_LOGGED_IN ) && set_getbool( &ic->irc->b->set, "display_namechanges" ) )
+		if( ( ic->flags & OPT_LOGGED_IN ) && set_getbool( &ic->bee->set, "display_namechanges" ) )
 			imcb_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname );
 	}
@@ -489,12 +421,10 @@
 		g_free( name );
 	}
+#endif
 }
 
 void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group )
 {
-	user_t *u;
-	
-	if( ( u = user_findhandle( ic, handle ) ) )
-		user_del( ic->irc, u->nick );
+	bee_user_free( ic->bee, ic, handle );
 }
 
@@ -503,4 +433,5 @@
 void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick )
 {
+#if 0
 	user_t *u = user_findhandle( ic, handle );
 	char newnick[MAX_NICK_LENGTH+1], *orig_nick;
@@ -517,5 +448,5 @@
 		/* Some processing to make sure this string is a valid IRC nickname. */
 		nick_strip( newnick );
-		if( set_getbool( &ic->irc->b->set, "lcnicks" ) )
+		if( set_getbool( &ic->bee->set, "lcnicks" ) )
 			nick_lc( newnick );
 		
@@ -534,4 +465,5 @@
 		}
 	}
+#endif
 }
 
@@ -565,4 +497,5 @@
 void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname )
 {
+#if 0
 	struct imcb_ask_cb_data *data = g_new0( struct imcb_ask_cb_data, 1 );
 	char *s, *realname_ = NULL;
@@ -579,4 +512,5 @@
 	data->handle = g_strdup( handle );
 	query_add( ic->irc, ic, s, imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, data );
+#endif
 }
 
@@ -599,4 +533,5 @@
 void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname )
 {
+#if 0
 	struct imcb_ask_cb_data *data = g_new0( struct imcb_ask_cb_data, 1 );
 	char *s;
@@ -611,26 +546,21 @@
 	data->handle = g_strdup( handle );
 	query_add( ic->irc, ic, s, imcb_ask_add_cb_yes, imcb_ask_add_cb_no, data );
-}
-
-
-/* server.c */                    
+#endif
+}
 
 void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, const char *state, const char *message )
 {
-	user_t *u;
-	int oa, oo;
-	
-	u = user_findhandle( ic, (char*) handle );
-	
-	if( !u )
-	{
-		if( g_strcasecmp( set_getstr( &ic->irc->b->set, "handle_unknown" ), "add" ) == 0 )
-		{
-			imcb_add_buddy( ic, (char*) handle, NULL );
-			u = user_findhandle( ic, (char*) handle );
+	bee_t *bee = ic->bee;
+	bee_user_t *bu, *old;
+	
+	if( !( bu = bee_user_by_handle( bee, ic, handle ) ) )
+	{
+		if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 )
+		{
+			bu = bee_user_new( bee, ic, handle );
 		}
 		else
 		{
-			if( set_getbool( &ic->irc->b->set, "debug" ) || g_strcasecmp( set_getstr( &ic->irc->b->set, "handle_unknown" ), "ignore" ) != 0 )
+			if( set_getbool( &ic->bee->set, "debug" ) || g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "ignore" ) != 0 )
 			{
 				imcb_log( ic, "imcb_buddy_status() for unknown handle %s:", handle );
@@ -643,4 +573,20 @@
 	}
 	
+	/* May be nice to give the UI something to compare against. */
+	old = g_memdup( bu, sizeof( bee_user_t ) );
+	
+	/* TODO(wilmer): OPT_AWAY, or just state == NULL ? */
+	bu->flags = ( flags & OPT_LOGGED_IN ? BEE_USER_ONLINE : 0 ) |
+	            ( flags & OPT_AWAY ? BEE_USER_AWAY : 0 );
+	bu->status = g_strdup( ( flags & OPT_AWAY ) && state == NULL ? "Away" : state );
+	bu->status_msg = g_strdup( message );
+	
+	if( bee->ui->user_status )
+		bee->ui->user_status( bee, bu, old );
+	
+	g_free( old->status_msg );
+	g_free( old->status );
+	g_free( old );
+#if 0	
 	oa = u->away != NULL;
 	oo = u->online;
@@ -692,5 +638,5 @@
 	
 	/* LISPy... */
-	if( ( set_getbool( &ic->irc->b->set, "away_devoice" ) ) &&		/* Don't do a thing when user doesn't want it */
+	if( ( set_getbool( &ic->bee->set, "away_devoice" ) ) &&		/* Don't do a thing when user doesn't want it */
 	    ( u->online ) &&						/* Don't touch offline people */
 	    ( ( ( u->online != oo ) && !u->away ) ||			/* Voice joining people */
@@ -699,5 +645,5 @@
 		char *from;
 		
-		if( set_getbool( &ic->irc->b->set, "simulate_netsplit" ) )
+		if( set_getbool( &ic->bee->set, "simulate_netsplit" ) )
 		{
 			from = g_strdup( ic->irc->myhost );
@@ -712,9 +658,11 @@
 		g_free( from );
 	}
+#endif
 }
 
 void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at )
 {
-	irc_t *irc = ic->irc;
+#if 0
+	bee_t *bee = ic->bee;
 	char *wrapped;
 	user_t *u;
@@ -724,9 +672,9 @@
 	if( !u )
 	{
-		char *h = set_getstr( &irc->b->set, "handle_unknown" );
+		char *h = set_getstr( &bee->set, "handle_unknown" );
 		
 		if( g_strcasecmp( h, "ignore" ) == 0 )
 		{
-			if( set_getbool( &irc->b->set, "debug" ) )
+			if( set_getbool( &bee->set, "debug" ) )
 				imcb_log( ic, "Ignoring message from unknown handle %s", handle );
 			
@@ -735,5 +683,5 @@
 		else if( g_strncasecmp( h, "add", 3 ) == 0 )
 		{
-			int private = set_getbool( &irc->b->set, "private" );
+			int private = set_getbool( &bee->set, "private" );
 			
 			if( h[3] )
@@ -756,6 +704,6 @@
 	}
 	
-	if( ( g_strcasecmp( set_getstr( &ic->irc->b->set, "strip_html" ), "always" ) == 0 ) ||
-	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->b->set, "strip_html" ) ) )
+	if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
+	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) )
 		strip_html( msg );
 
@@ -763,11 +711,13 @@
 	irc_msgfrom( irc, u->nick, wrapped );
 	g_free( wrapped );
+#endif
 }
 
 void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags )
 {
+#if 0
 	user_t *u;
 	
-	if( !set_getbool( &ic->irc->b->set, "typing_notice" ) )
+	if( !set_getbool( &ic->bee->set, "typing_notice" ) )
 		return;
 	
@@ -779,8 +729,15 @@
 		irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf );
 	}
+#endif
+}
+
+struct bee_user *imcb_buddy_by_handle( struct im_connection *ic, const char *handle )
+{
+	return bee_user_by_handle( ic->bee, ic, handle );
 }
 
 struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle )
 {
+#if 0
 	struct groupchat *c;
 	
@@ -800,17 +757,19 @@
 	c->topic = g_strdup_printf( "BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", c->title );
 	
-	if( set_getbool( &ic->irc->b->set, "debug" ) )
+	if( set_getbool( &ic->bee->set, "debug" ) )
 		imcb_log( ic, "Creating new conversation: (id=%p,handle=%s)", c, handle );
 	
 	return c;
+#endif
 }
 
 void imcb_chat_free( struct groupchat *c )
 {
+#if 0
 	struct im_connection *ic = c->ic;
 	struct groupchat *l;
 	GList *ir;
 	
-	if( set_getbool( &ic->irc->b->set, "debug" ) )
+	if( set_getbool( &ic->bee->set, "debug" ) )
 		imcb_log( ic, "You were removed from conversation %p", c );
 	
@@ -845,8 +804,10 @@
 		g_free( c );
 	}
+#endif
 }
 
 void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at )
 {
+#if 0
 	struct im_connection *ic = c->ic;
 	char *wrapped;
@@ -859,6 +820,6 @@
 	u = user_findhandle( ic, who );
 	
-	if( ( g_strcasecmp( set_getstr( &ic->irc->b->set, "strip_html" ), "always" ) == 0 ) ||
-	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->b->set, "strip_html" ) ) )
+	if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
+	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) )
 		strip_html( msg );
 	
@@ -873,8 +834,10 @@
 	}
 	g_free( wrapped );
+#endif
 }
 
 void imcb_chat_log( struct groupchat *c, char *format, ... )
 {
+#if 0
 	irc_t *irc = c->ic->irc;
 	va_list params;
@@ -891,8 +854,10 @@
 	
 	g_free( text );
+#endif
 }
 
 void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at )
 {
+#if 0
 	struct im_connection *ic = c->ic;
 	user_t *u = NULL;
@@ -905,6 +870,6 @@
 		u = user_findhandle( ic, who );
 	
-	if( ( g_strcasecmp( set_getstr( &ic->irc->b->set, "strip_html" ), "always" ) == 0 ) ||
-	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->b->set, "strip_html" ) ) )
+	if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
+	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) )
 		strip_html( topic );
 	
@@ -914,15 +879,14 @@
 	if( c->joined && u )
 		irc_write( ic->irc, ":%s!%s@%s TOPIC %s :%s", u->nick, u->user, u->host, c->channel, topic );
-}
-
-
-/* buddy_chat.c */
+#endif
+}
 
 void imcb_chat_add_buddy( struct groupchat *b, const char *handle )
 {
+#if 0
 	user_t *u = user_findhandle( b->ic, handle );
 	int me = 0;
 	
-	if( set_getbool( &b->ic->irc->b->set, "debug" ) )
+	if( set_getbool( &b->ic->bee->set, "debug" ) )
 		imcb_log( b->ic, "User %s added to conversation %p", handle, b );
 	
@@ -951,4 +915,5 @@
 		b->in_room = g_list_append( b->in_room, g_strdup( handle ) );
 	}
+#endif
 }
 
@@ -956,8 +921,9 @@
 void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason )
 {
+#if 0
 	user_t *u;
 	int me = 0;
 	
-	if( set_getbool( &b->ic->irc->b->set, "debug" ) )
+	if( set_getbool( &b->ic->bee->set, "debug" ) )
 		imcb_log( b->ic, "User %s removed from conversation %p (%s)", handle, b, reason ? reason : "" );
 	
@@ -979,8 +945,10 @@
 	if( me || ( remove_chat_buddy_silent( b, handle ) && b->joined && u ) )
 		irc_part( b->ic->irc, u, b->channel );
+#endif
 }
 
 static int remove_chat_buddy_silent( struct groupchat *b, const char *handle )
 {
+#if 0
 	GList *i;
 	
@@ -998,11 +966,12 @@
 		i = i->next;
 	}
-	
-	return( 0 );
+#endif
+	
+	return 0;
 }
 
 
 /* Misc. BitlBee stuff which shouldn't really be here */
-
+#if 0
 char *set_eval_away_devoice( set_t *set, char *value )
 {
@@ -1059,5 +1028,5 @@
 	return value;
 }
-
+#endif
 
 
@@ -1106,5 +1075,5 @@
 	
 	away = set_getstr( &ic->acc->set, "away" ) ?
-	     : set_getstr( &ic->irc->b->set, "away" );
+	     : set_getstr( &ic->bee->set, "away" );
 	if( away && *away )
 	{
@@ -1117,5 +1086,5 @@
 		away = NULL;
 		msg = set_getstr( &ic->acc->set, "status" ) ?
-		    : set_getstr( &ic->irc->b->set, "status" );
+		    : set_getstr( &ic->bee->set, "status" );
 	}
 	
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/nogaim.h	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -87,5 +87,5 @@
 	
 	/* BitlBee */
-	irc_t *irc;
+	bee_t *bee;
 	
 	struct groupchat *groupchats;
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision 10a96f44efbeb6af09e2728926ce15b6bda12131)
+++ protocols/oscar/oscar.c	(revision 81e04e162bdc4517b2f357fd16dfd76f68245464)
@@ -1190,6 +1190,5 @@
 	aim_ssi_auth_reply(od->sess, od->conn, uin, 1, "");
 	// aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message);
-	if(imcb_find_buddy(data->ic, uin) == NULL)
-		imcb_ask_add(data->ic, uin, NULL);
+	imcb_ask_add(data->ic, uin, NULL);
 	
 	g_free(uin);
@@ -1952,4 +1951,5 @@
 	struct oscar_data *odata = (struct oscar_data *)g->proto_data;
 	if (odata->icq) {
+		/** FIXME(wilmer): Hmm, lost the ability to get away msgs here, do we care to get that back?
 		struct buddy *budlight = imcb_find_buddy(g, who);
 		if (budlight)
@@ -1957,4 +1957,5 @@
 				if (budlight->caps & AIM_CAPS_ICQSERVERRELAY)
 					aim_send_im_ch2_geticqmessage(odata->sess, who, (budlight->uc & 0xff80) >> 7);
+		*/
 	} else
 		aim_getinfo(odata->sess, odata->conn, who, AIM_GETINFO_AWAYMESSAGE);
@@ -2094,5 +2095,5 @@
 		switch (curitem->type) {
 			case 0x0000: /* Buddy */
-				if ((curitem->name) && (!imcb_find_buddy(ic, nrm))) {
+				if ((curitem->name) && (!imcb_buddy_by_handle(ic, nrm))) {
 					char *realname = NULL;
 
