Index: protocols/jabber/io.c
===================================================================
--- protocols/jabber/io.c	(revision 0da65d5fb37691ed4d31f7ab4058732f1440db6b)
+++ protocols/jabber/io.c	(revision aef4828a1dc51de10a43bb7dd5d023de9971295b)
@@ -117,6 +117,6 @@
 		jd->fd = -1;
 		
-		hide_login_progress_error( ic, "Short write() to server" );
-		signoff( ic );
+		imc_error( ic, "Short write() to server" );
+		imc_logout( ic );
 		return FALSE;
 	}
@@ -160,6 +160,6 @@
 		if( xt_feed( jd->xt, buf, st ) < 0 )
 		{
-			hide_login_progress_error( ic, "XML stream error" );
-			signoff( ic );
+			imc_error( ic, "XML stream error" );
+			imc_logout( ic );
 			return FALSE;
 		}
@@ -203,7 +203,7 @@
 					if( set_getbool( &ic->acc->set, "tls" ) )
 					{
-						hide_login_progress( ic, "TLS is turned on for this "
+						imc_error( ic, "TLS is turned on for this "
 						          "account, but is not supported by this server" );
-						signoff( ic );
+						imc_logout( ic );
 						return FALSE;
 					}
@@ -216,6 +216,6 @@
 			else
 			{
-				hide_login_progress( ic, "XML stream error" );
-				signoff( ic );
+				imc_error( ic, "XML stream error" );
+				imc_logout( ic );
 				return FALSE;
 			}
@@ -227,6 +227,6 @@
 		jd->fd = -1;
 		
-		hide_login_progress_error( ic, "Error while reading from server" );
-		signoff( ic );
+		imc_error( ic, "Error while reading from server" );
+		imc_logout( ic );
 		return FALSE;
 	}
@@ -242,10 +242,10 @@
 	if( source == -1 )
 	{
-		hide_login_progress( ic, "Could not connect to server" );
-		signoff( ic );
+		imc_error( ic, "Could not connect to server" );
+		imc_logout( ic );
 		return FALSE;
 	}
 	
-	set_login_progress( ic, 1, "Connected to server, logging in" );
+	imc_log( ic, "Connected to server, logging in" );
 	
 	return jabber_start_stream( ic );
@@ -263,10 +263,10 @@
 		jd->ssl = NULL;
 		
-		hide_login_progress( ic, "Could not connect to server" );
-		signoff( ic );
+		imc_error( ic, "Could not connect to server" );
+		imc_logout( ic );
 		return FALSE;
 	}
 	
-	set_login_progress( ic, 1, "Connected to server, logging in" );
+	imc_log( ic, "Connected to server, logging in" );
 	
 	return jabber_start_stream( ic );
@@ -275,5 +275,5 @@
 static xt_status jabber_end_of_stream( struct xt_node *node, gpointer data )
 {
-	signoff( data );
+	imc_logout( data );
 	return XT_ABORT;
 }
@@ -297,6 +297,6 @@
 		if( c && ( !trytls && !set_getbool( &ic->acc->set, "tls" ) ) )
 		{
-			hide_login_progress( ic, "Server requires TLS connections, but TLS is turned off for this account" );
-			signoff( ic );
+			imc_error( ic, "Server requires TLS connections, but TLS is turned off for this account" );
+			imc_logout( ic );
 			
 			return XT_ABORT;
@@ -327,6 +327,6 @@
 		if( !trytls && set_getbool( &ic->acc->set, "tls" ) )
 		{
-			hide_login_progress( ic, "TLS is turned on for this account, but is not supported by this server" );
-			signoff( ic );
+			imc_error( ic, "TLS is turned on for this account, but is not supported by this server" );
+			imc_logout( ic );
 			
 			return XT_ABORT;
@@ -417,5 +417,5 @@
 	jd->w_inpa = jd->r_inpa = 0;
 	
-	set_login_progress( ic, 1, "Converting stream to TLS" );
+	imc_log( ic, "Converting stream to TLS" );
 	
 	jd->ssl = ssl_starttls( jd->fd, jabber_connected_ssl, ic );
@@ -452,6 +452,6 @@
 	if( type == NULL )
 	{
-		hide_login_progress_error( ic, "Unknown stream error reported by server" );
-		signoff( ic );
+		imc_error( ic, "Unknown stream error reported by server" );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -462,5 +462,5 @@
 	if( strcmp( type, "conflict" ) == 0 )
 	{
-		hide_login_progress( ic, "Account and resource used from a different location" );
+		imc_error( ic, "Account and resource used from a different location" );
 		ic->wants_to_die = TRUE;
 	}
@@ -468,9 +468,9 @@
 	{
 		s = g_strdup_printf( "Stream error: %s%s%s", type, text ? ": " : "", text ? text : "" );
-		hide_login_progress_error( ic, s );
+		imc_error( ic, s );
 		g_free( s );
 	}
 	
-	signoff( ic );
+	imc_logout( ic );
 	
 	return XT_ABORT;
Index: protocols/jabber/iq.c
===================================================================
--- protocols/jabber/iq.c	(revision 0da65d5fb37691ed4d31f7ab4058732f1440db6b)
+++ protocols/jabber/iq.c	(revision aef4828a1dc51de10a43bb7dd5d023de9971295b)
@@ -39,6 +39,6 @@
 	if( !type )
 	{
-		hide_login_progress_error( ic, "Received IQ packet without type." );
-		signoff( ic );
+		imc_error( ic, "Received IQ packet without type." );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -60,5 +60,5 @@
 		
 		if( entry == NULL )
-			serv_got_crap( ic, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s );
+			imc_log( ic, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s );
 		else if( entry->func )
 			return entry->func( ic, node, entry->node );
@@ -69,5 +69,5 @@
 		    !( s = xt_find_attr( c, "xmlns" ) ) )
 		{
-			serv_got_crap( ic, "WARNING: Received incomplete IQ-%s packet", type );
+			imc_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
 			return XT_HANDLED;
 		}
@@ -132,5 +132,5 @@
 		    !( s = xt_find_attr( c, "xmlns" ) ) )
 		{
-			serv_got_crap( ic, "WARNING: Received incomplete IQ-%s packet", type );
+			imc_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
 			return XT_HANDLED;
 		}
@@ -154,5 +154,5 @@
 			else
 			{
-				serv_got_crap( ic, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" );
+				imc_log( ic, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" );
 				
 				xt_free_node( reply );
@@ -219,6 +219,6 @@
 	if( !( query = xt_find_node( node->children, "query" ) ) )
 	{
-		serv_got_crap( ic, "WARNING: Received incomplete IQ packet while authenticating" );
-		signoff( ic );
+		imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
+		imc_logout( ic );
 		return XT_HANDLED;
 	}
@@ -258,6 +258,6 @@
 		xt_free_node( reply );
 		
-		hide_login_progress( ic, "Can't find suitable authentication method" );
-		signoff( ic );
+		imc_error( ic, "Can't find suitable authentication method" );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -277,6 +277,6 @@
 	if( !( type = xt_find_attr( node, "type" ) ) )
 	{
-		serv_got_crap( ic, "WARNING: Received incomplete IQ packet while authenticating" );
-		signoff( ic );
+		imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
+		imc_logout( ic );
 		return XT_HANDLED;
 	}
@@ -284,6 +284,6 @@
 	if( strcmp( type, "error" ) == 0 )
 	{
-		hide_login_progress( ic, "Authentication failure" );
-		signoff( ic );
+		imc_error( ic, "Authentication failure" );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -311,5 +311,5 @@
 		if( c && c->text_len && ( s = strchr( c->text, '/' ) ) &&
 		    strcmp( s + 1, set_getstr( &ic->acc->set, "resource" ) ) != 0 )
-			serv_got_crap( ic, "Server changed session resource string to `%s'", s + 1 );
+			imc_log( ic, "Server changed session resource string to `%s'", s + 1 );
 		
 		jd->flags &= ~JFLAG_WAIT_BIND;
@@ -334,5 +334,5 @@
 	int st;
 	
-	set_login_progress( ic, 1, "Authenticated, requesting buddy list" );
+	imc_log( ic, "Authenticated, requesting buddy list" );
 	
 	node = xt_new_node( "query", NULL, NULL );
@@ -353,5 +353,5 @@
 	if( !( query = xt_find_node( node->children, "query" ) ) )
 	{
-		serv_got_crap( ic, "WARNING: Received NULL roster packet" );
+		imc_log( ic, "WARNING: Received NULL roster packet" );
 		return XT_HANDLED;
 	}
@@ -397,5 +397,5 @@
 	
 	if( initial )
-		account_online( ic );
+		imc_connected( ic );
 	
 	return XT_HANDLED;
@@ -428,5 +428,5 @@
 	{
 		s = xt_find_attr( orig, "to" ); /* If this returns NULL something's wrong.. */
-		serv_got_crap( ic, "Could not retrieve vCard of %s", s ? s : "(NULL)" );
+		imc_log( ic, "Could not retrieve vCard of %s", s ? s : "(NULL)" );
 		return XT_HANDLED;
 	}
@@ -536,5 +536,5 @@
 	/* *sigh* */
 	
-	serv_got_crap( ic, reply->str );
+	imc_log( ic, reply->str );
 	g_string_free( reply, TRUE );
 	
Index: protocols/jabber/jabber.c
===================================================================
--- protocols/jabber/jabber.c	(revision 0da65d5fb37691ed4d31f7ab4058732f1440db6b)
+++ protocols/jabber/jabber.c	(revision aef4828a1dc51de10a43bb7dd5d023de9971295b)
@@ -59,5 +59,5 @@
 static void jabber_login( account_t *acc )
 {
-	struct im_connection *ic = new_gaim_conn( acc );
+	struct im_connection *ic = imc_new( acc );
 	struct jabber_data *jd = g_new0( struct jabber_data, 1 );
 	struct ns_srv_reply *srv = NULL;
@@ -72,6 +72,6 @@
 	if( jd->server == NULL )
 	{
-		hide_login_progress( ic, "Incomplete account name (format it like <username@jabberserver.name>)" );
-		signoff( ic );
+		imc_error( ic, "Incomplete account name (format it like <username@jabberserver.name>)" );
+		imc_logout( ic );
 		return;
 	}
@@ -159,12 +159,12 @@
 		connect_to = jd->server;
 	
-	set_login_progress( ic, 0, "Connecting" );
+	imc_log( ic, "Connecting" );
 	
 	if( set_getint( &acc->set, "port" ) < JABBER_PORT_MIN ||
 	    set_getint( &acc->set, "port" ) > JABBER_PORT_MAX )
 	{
-		serv_got_crap( ic, "Incorrect port number, must be in the %d-%d range",
+		imc_log( ic, "Incorrect port number, must be in the %d-%d range",
 		               JABBER_PORT_MIN, JABBER_PORT_MAX );
-		signoff( ic );
+		imc_logout( ic );
 		return;
 	}
@@ -186,6 +186,6 @@
 	if( jd->fd == -1 )
 	{
-		hide_login_progress( ic, "Could not connect to server" );
-		signoff( ic );
+		imc_error( ic, "Could not connect to server" );
+		imc_logout( ic );
 	}
 }
@@ -285,5 +285,5 @@
 	while( bud )
 	{
-		serv_got_crap( ic, "Buddy %s (%d) information:\nAway state: %s\nAway message: %s",
+		imc_log( ic, "Buddy %s (%d) information:\nAway state: %s\nAway message: %s",
 		                   bud->full_jid, bud->priority,
 		                   bud->away_state ? bud->away_state->full_name : "(none)",
Index: protocols/jabber/presence.c
===================================================================
--- protocols/jabber/presence.c	(revision 0da65d5fb37691ed4d31f7ab4058732f1440db6b)
+++ protocols/jabber/presence.c	(revision aef4828a1dc51de10a43bb7dd5d023de9971295b)
@@ -41,5 +41,5 @@
 		{
 			if( set_getbool( &ic->irc->set, "debug" ) )
-				serv_got_crap( ic, "WARNING: Could not handle presence information from JID: %s", from );
+				imc_log( ic, "WARNING: Could not handle presence information from JID: %s", from );
 			return XT_HANDLED;
 		}
@@ -74,5 +74,5 @@
 		{
 			if( set_getbool( &ic->irc->set, "debug" ) )
-				serv_got_crap( ic, "WARNING: Received presence information from unknown JID: %s", from );
+				imc_log( ic, "WARNING: Received presence information from unknown JID: %s", from );
 			return XT_HANDLED;
 		}
@@ -103,5 +103,5 @@
 	{
 		/* Not sure about this one, actually... */
-		serv_got_crap( ic, "%s just accepted your authorization request", from );
+		imc_log( ic, "%s just accepted your authorization request", from );
 	}
 	else if( strcmp( type, "unsubscribe" ) == 0 || strcmp( type, "unsubscribed" ) == 0 )
Index: protocols/jabber/sasl.c
===================================================================
--- protocols/jabber/sasl.c	(revision 0da65d5fb37691ed4d31f7ab4058732f1440db6b)
+++ protocols/jabber/sasl.c	(revision aef4828a1dc51de10a43bb7dd5d023de9971295b)
@@ -38,5 +38,5 @@
 		   IQ authentication. Strange things happen when you try
 		   to do both... */
-		serv_got_crap( ic, "XMPP 1.0 non-compliant server seems to support SASL, please report this as a BitlBee bug!" );
+		imc_log( ic, "XMPP 1.0 non-compliant server seems to support SASL, please report this as a BitlBee bug!" );
 		return XT_HANDLED;
 	}
@@ -45,5 +45,5 @@
 	if( !s || strcmp( s, XMLNS_SASL ) != 0 )
 	{
-		signoff( ic );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -62,6 +62,6 @@
 	if( !sup_plain && !sup_digest )
 	{
-		hide_login_progress( ic, "No known SASL authentication schemes supported" );
-		signoff( ic );
+		imc_error( ic, "No known SASL authentication schemes supported" );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -279,6 +279,6 @@
 
 error:
-	hide_login_progress( ic, "Incorrect SASL challenge received" );
-	signoff( ic );
+	imc_error( ic, "Incorrect SASL challenge received" );
+	imc_logout( ic );
 
 silent_error:
@@ -303,5 +303,5 @@
 	if( !s || strcmp( s, XMLNS_SASL ) != 0 )
 	{
-		signoff( ic );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
@@ -309,11 +309,11 @@
 	if( strcmp( node->name, "success" ) == 0 )
 	{
-		set_login_progress( ic, 1, "Authentication finished" );
+		imc_log( ic, "Authentication finished" );
 		jd->flags |= JFLAG_AUTHENTICATED | JFLAG_STREAM_RESTART;
 	}
 	else if( strcmp( node->name, "failure" ) == 0 )
 	{
-		hide_login_progress( ic, "Authentication failure" );
-		signoff( ic );
+		imc_error( ic, "Authentication failure" );
+		imc_logout( ic );
 		return XT_ABORT;
 	}
