Index: protocols/twitter/twitter.c
===================================================================
--- protocols/twitter/twitter.c	(revision 37aa3172c7e9ec6ba7b5985ed60c41c621e8e7b9)
+++ protocols/twitter/twitter.c	(revision e88fbe272c097066e538d670fe8fa907e9847321)
@@ -41,5 +41,5 @@
 	// If the user uses multiple private message windows we need to get the 
 	// users buddies.
-	if (!set_getbool( &ic->acc->set, "use_groupchat" ))
+	if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "many") == 0)
 		twitter_get_statuses_friends(ic, -1);
 
@@ -51,9 +51,19 @@
 }
 
+static char *set_eval_mode( set_t *set, char *value )
+{
+	if( g_strcasecmp( value, "one" ) == 0 ||
+	    g_strcasecmp( value, "many" ) == 0 ||
+	    g_strcasecmp( value, "char" ) == 0 )
+		return value;
+	else
+		return NULL;
+}
 
 static void twitter_init( account_t *acc )
 {
 	set_t *s;
-	s = set_add( &acc->set, "use_groupchat", "false", set_eval_bool, acc );
+	
+	s = set_add( &acc->set, "mode", "one", set_eval_mode, acc );
 	s->flags |= ACC_SET_OFFLINE_ONLY;
 }
@@ -67,4 +77,5 @@
 	struct im_connection *ic = imcb_new( acc );
 	struct twitter_data *td = g_new0( struct twitter_data, 1 );
+	char name[strlen(acc->user)+9];
 
 	twitter_connections = g_slist_append( twitter_connections, ic );
@@ -84,4 +95,8 @@
 	// Save the return value, so we can remove the timeout on logout.
 	td->main_loop_id = b_timeout_add(60000, twitter_main_loop, ic);
+	
+	sprintf( name, "twitter_%s", acc->user );
+	imcb_add_buddy( ic, name, NULL );
+	imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL );
 }
 
@@ -115,9 +130,10 @@
 static int twitter_buddy_msg( struct im_connection *ic, char *who, char *message, int away )
 {
-	// Let's just update the status.
-//	if ( g_strcasecmp(who, ic->acc->user) == 0 )
+	if (g_strncasecmp(who, "twitter_", 8) == 0 &&
+	    g_strcasecmp(who + 8, ic->acc->user) == 0)
 		twitter_post_status(ic, message);
-//	else
-//		twitter_direct_messages_new(ic, who, message);
+	else
+		twitter_direct_messages_new(ic, who, message);
+	
 	return( 0 );
 }
Index: protocols/twitter/twitter_lib.c
===================================================================
--- protocols/twitter/twitter_lib.c	(revision 37aa3172c7e9ec6ba7b5985ed60c41c621e8e7b9)
+++ protocols/twitter/twitter_lib.c	(revision e88fbe272c097066e538d670fe8fa907e9847321)
@@ -105,10 +105,12 @@
 	if (!imcb_find_buddy( ic, name ))
 	{
+		char *mode = set_getstr(&ic->acc->set, "mode");
+		
 		// The buddy is not in the list, add the buddy and set the status to logged in.
 		imcb_add_buddy( ic, name, NULL );
 		imcb_rename_buddy( ic, name, fullname );
-		if (set_getbool( &ic->acc->set, "use_groupchat" ))
+		if (g_strcasecmp(mode, "chat") == 0)
 			imcb_chat_add_buddy( td->home_timeline_gc, name );
-		else
+		else if (g_strcasecmp(mode, "many") == 0)
 			imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL );
 	}
@@ -452,12 +454,35 @@
 	GSList *l = NULL;
 	struct twitter_xml_status *status;
-
+	char from[MAX_STRING];
+	gboolean mode_one;
+	
+	mode_one = g_strcasecmp( set_getstr( &ic->acc->set, "mode" ), "one" ) == 0;
+
+	if( mode_one )
+	{
+		g_snprintf( from, sizeof( from ) - 1, "twitter_%s", ic->acc->user );
+		from[MAX_STRING-1] = '\0';
+	}
+	
 	for ( l = list; l ; l = g_slist_next(l) )
 	{
+		char *text = NULL;
+		
 		status = l->data;
-		imcb_buddy_msg( ic, status->user->screen_name, status->text, 0, status->created_at );
+		
+		if( mode_one )
+			text = g_strdup_printf( "\002<\002%s\002>\002 %s",
+			                        status->user->screen_name, status->text );
+		
+		imcb_buddy_msg( ic,
+		                mode_one ? from : status->user->screen_name,
+		                mode_one ? text : status->text,
+		                0, status->created_at );
+		
 		// Update the home_timeline_id to hold the highest id, so that by the next request
 		// we won't pick up the updates allready in the list.
 		td->home_timeline_id = td->home_timeline_id < status->id ? status->id : td->home_timeline_id;
+		
+		g_free( text );
 	}
 }
@@ -512,5 +537,5 @@
 
 	// See if the user wants to see the messages in a groupchat window or as private messages.
-	if (set_getbool( &ic->acc->set, "use_groupchat" ))
+	if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
 		twitter_groupchat(ic, txl->list);
 	else
@@ -612,5 +637,5 @@
 	if (req->status_code != 200) {
 		// It didn't go well, output the error and return.
-		imcb_error(ic, "Could not post tweet... HTTP STATUS: %d", req->status_code);
+		imcb_error(ic, "Could not post message... HTTP STATUS: %d", req->status_code);
 		return;
 	}
