Index: root_commands.c
===================================================================
--- root_commands.c	(revision 5c9512ffa716f2bc8bbf9e2c31ee40624a0ff842)
+++ root_commands.c	(revision 0a3c243b6659dc10efb227e507f324c2711d6dcd)
@@ -400,5 +400,5 @@
 		else
 		{
-			nick_set( irc, cmd[2], a->gc->prpl, cmd[3] );
+			nick_set( irc, cmd[2], a->gc->acc->prpl, cmd[3] );
 		}
 	}
@@ -407,5 +407,5 @@
 	   add them to your *real* (server-side) contact list. */
 	if( add_for_real )
-		a->gc->prpl->add_buddy( a->gc, cmd[2] );
+		a->gc->acc->prpl->add_buddy( a->gc, cmd[2] );
 		
 	add_buddy( a->gc, NULL, cmd[2], cmd[2] );
@@ -441,5 +441,5 @@
 	}
 	
-	if( !gc->prpl->get_info )
+	if( !gc->acc->prpl->get_info )
 	{
 		irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
@@ -447,5 +447,5 @@
 	else
 	{
-		gc->prpl->get_info( gc, cmd[2] );
+		gc->acc->prpl->get_info( gc, cmd[2] );
 	}
 }
@@ -482,5 +482,5 @@
 		else if( u->send_handler == buddy_send_handler )
 		{
-			nick_set( irc, u->handle, u->gc->prpl, cmd[2] );
+			nick_set( irc, u->handle, u->gc->acc->prpl, cmd[2] );
 		}
 		
@@ -501,5 +501,5 @@
 	s = g_strdup( u->handle );
 	
-	u->gc->prpl->remove_buddy( u->gc, u->handle, NULL );
+	u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL );
 	user_del( irc, cmd[1] );
 	nick_del( irc, cmd[1] );
@@ -558,5 +558,5 @@
 	}
 	
-	if( !gc->prpl->add_deny || !gc->prpl->rem_permit )
+	if( !gc->acc->prpl->add_deny || !gc->acc->prpl->rem_permit )
 	{
 		irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
@@ -617,5 +617,5 @@
 	}
 	
-	if( !gc->prpl->rem_deny || !gc->prpl->add_permit )
+	if( !gc->acc->prpl->rem_deny || !gc->acc->prpl->add_permit )
 	{
 		irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
@@ -733,5 +733,5 @@
 		if( online == 1 )
 		{
-			g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name );
+			g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name );
 			irc_usermsg( irc, format, u->nick, s, "Online" );
 		}
@@ -744,5 +744,5 @@
 		if( away == 1 )
 		{
-			g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name );
+			g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name );
 			irc_usermsg( irc, format, u->nick, s, u->away );
 		}
@@ -754,5 +754,5 @@
 		if( offline == 1 )
 		{
-			g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name );
+			g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name );
 			irc_usermsg( irc, format, u->nick, s, "Offline" );
 		}
@@ -779,5 +779,5 @@
 		irc_usermsg( irc, "Your name is `%s'" , a->gc->displayname ? a->gc->displayname : "NULL" );
 	}
-	else if ( !a->gc->prpl->set_info ) 
+	else if ( !a->prpl->set_info ) 
 	{
 		irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
@@ -787,5 +787,5 @@
 		irc_usermsg( irc, "Setting your name to `%s'", cmd[2] );
 		
-		a->gc->prpl->set_info( a->gc, cmd[2] );
+		a->prpl->set_info( a->gc, cmd[2] );
 	}
 }
@@ -806,5 +806,5 @@
 	for( num = 0; q; q = q->next, num ++ )
 		if( q->gc ) /* Not necessary yet, but it might come later */
-			irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc->prpl->name, q->gc->username, q->question );
+			irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc->acc->prpl->name, q->gc->username, q->question );
 		else
 			irc_usermsg( irc, "%d, BitlBee: %s", num, q->question );
@@ -834,8 +834,9 @@
 			user_t *u;
 			
+			/* FIXME: Hmmm, this is actually pretty dangerous code... REMOVEME? :-) */
 			for( u = irc->users; u; u = u->next )
 				if( u->gc == gc )
 				{
-					u->gc->prpl->remove_buddy( u->gc, u->handle, NULL );
+					u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL );
 					user_del( irc, u->nick );
 				}
@@ -852,7 +853,7 @@
 	for( n = gc->irc->nicks; n; n = n->next )
 	{
-		if( n->proto == gc->prpl && !user_findhandle( gc, n->handle ) )
-		{
-	                gc->prpl->add_buddy( gc, n->handle );
+		if( n->proto == gc->acc->prpl && !user_findhandle( gc, n->handle ) )
+		{
+	                gc->acc->prpl->add_buddy( gc, n->handle );
 	                add_buddy( gc, NULL, n->handle, NULL );
 		}
