Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
+++ protocols/nogaim.c	(revision 84b045d409f1e8da6d8bf379c6fef7236dcd9bcd)
@@ -145,5 +145,5 @@
 /* multi.c */
 
-struct im_connection *imc_new( account_t *acc )
+struct im_connection *imcb_new( account_t *acc )
 {
 	struct im_connection *ic;
@@ -204,5 +204,5 @@
 }
 
-void imc_log( struct im_connection *ic, char *format, ... )
+void imcb_log( struct im_connection *ic, char *format, ... )
 {
 	va_list params;
@@ -221,5 +221,5 @@
 }
 
-void imc_error( struct im_connection *ic, char *format, ... )
+void imcb_error( struct im_connection *ic, char *format, ... )
 {
 	va_list params;
@@ -248,5 +248,5 @@
 }
 
-void imc_connected( struct im_connection *ic )
+void imcb_connected( struct im_connection *ic )
 {
 	user_t *u;
@@ -260,5 +260,5 @@
 	u = user_find( ic->irc, ic->irc->nick );
 	
-	imc_log( ic, "Logged in" );
+	imcb_log( ic, "Logged in" );
 	
 	ic->keepalive = b_timeout_add( 60000, send_keepalive, ic );
@@ -267,5 +267,5 @@
 	/* Also necessary when we're not away, at least for some of the
 	   protocols. */
-	bim_set_away( ic, u->away );
+	imc_set_away( ic, u->away );
 }
 
@@ -300,5 +300,5 @@
 		ic->flags |= OPT_LOGGING_OUT;
 	
-	imc_log( ic, "Signing off.." );
+	imcb_log( ic, "Signing off.." );
 	
 	b_event_remove( ic->keepalive );
@@ -334,5 +334,5 @@
 		int delay = set_getint( &irc->set, "auto_reconnect_delay" );
 		
-		imc_log( ic, "Reconnecting in %d seconds..", delay );
+		imcb_log( ic, "Reconnecting in %d seconds..", delay );
 		a->reconnect = b_timeout_add( delay * 1000, auto_reconnect, a );
 	}
@@ -344,5 +344,5 @@
 /* dialogs.c */
 
-void do_ask_dialog( struct im_connection *ic, char *msg, void *data, void *doit, void *dont )
+void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont )
 {
 	query_add( ic->irc, ic, msg, doit, dont, data );
@@ -360,10 +360,10 @@
 	
 	if( set_getbool( &irc->set, "debug" ) && 0 ) /* This message is too useless */
-		imc_log( ic, "Receiving user add from handle: %s", handle );
+		imcb_log( ic, "Receiving user add from handle: %s", handle );
 	
 	if( user_findhandle( ic, handle ) )
 	{
 		if( set_getbool( &irc->set, "debug" ) )
-			imc_log( ic, "User already exists, ignoring add request: %s", handle );
+			imcb_log( ic, "User already exists, ignoring add request: %s", handle );
 		
 		return;
@@ -448,5 +448,5 @@
 		
 		if( ( ic->flags & OPT_LOGGED_IN ) && set_getbool( &ic->irc->set, "display_namechanges" ) )
-			imc_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname );
+			imcb_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname );
 	}
 }
@@ -475,5 +475,5 @@
 }
 
-void show_got_added( struct im_connection *ic, char *handle, const char *realname )
+void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname )
 {
 	struct show_got_added_data *data = g_new0( struct show_got_added_data, 1 );
@@ -512,6 +512,6 @@
 			if( set_getbool( &ic->irc->set, "debug" ) || g_strcasecmp( set_getstr( &ic->irc->set, "handle_unknown" ), "ignore" ) != 0 )
 			{
-				imc_log( ic, "serv_got_update() for handle %s:", handle );
-				imc_log( ic, "loggedin = %d, type = %d", loggedin, type );
+				imcb_log( ic, "serv_got_update() for handle %s:", handle );
+				imcb_log( ic, "loggedin = %d, type = %d", loggedin, type );
 			}
 			
@@ -551,13 +551,4 @@
 	{
 		u->away = g_strdup( "Away" );
-	}
-	else if( ( type & UC_UNAVAILABLE ) && ( strcmp( ic->acc->prpl->name, "jabber" ) == 0 ) )
-	{
-		if( type & UC_DND )
-			u->away = g_strdup( "Do Not Disturb" );
-		else if( type & UC_XA )
-			u->away = g_strdup( "Extended Away" );
-		else // if( type & UC_AWAY )
-			u->away = g_strdup( "Away" );
 	}
 	else if( ( type & UC_UNAVAILABLE ) && ic->acc->prpl->get_status_string )
@@ -593,5 +584,5 @@
 		{
 			if( set_getbool( &irc->set, "debug" ) )
-				imc_log( ic, "Ignoring message from unknown handle %s", handle );
+				imcb_log( ic, "Ignoring message from unknown handle %s", handle );
 			
 			return;
@@ -615,5 +606,5 @@
 		else
 		{
-			imc_log( ic, "Message from unknown handle %s:", handle );
+			imcb_log( ic, "Message from unknown handle %s:", handle );
 			u = user_find( irc, irc->mynick );
 		}
@@ -685,5 +676,5 @@
 	
 	if( set_getbool( &ic->irc->set, "debug" ) )
-		imc_log( ic, "You were removed from conversation 0x%x", (int) c );
+		imcb_log( ic, "You were removed from conversation 0x%x", (int) c );
 	
 	if( c )
@@ -733,5 +724,5 @@
 		irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", msg );
 	else
-		imc_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, msg );
+		imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, msg );
 }
 
@@ -755,5 +746,5 @@
 	
 	if( set_getbool( &ic->irc->set, "debug" ) )
-		imc_log( ic, "Creating new conversation: (id=0x%x,handle=%s)", (int) c, handle );
+		imcb_log( ic, "Creating new conversation: (id=0x%x,handle=%s)", (int) c, handle );
 	
 	return c;
@@ -769,5 +760,5 @@
 	
 	if( set_getbool( &b->ic->irc->set, "debug" ) )
-		imc_log( b->ic, "User %s added to conversation 0x%x", handle, (int) b );
+		imcb_log( b->ic, "User %s added to conversation 0x%x", handle, (int) b );
 	
 	/* It might be yourself! */
@@ -803,5 +794,5 @@
 	
 	if( set_getbool( &b->ic->irc->set, "debug" ) )
-		imc_log( b->ic, "User %s removed from conversation 0x%x (%s)", handle, (int) b, reason ? reason : "" );
+		imcb_log( b->ic, "User %s removed from conversation 0x%x (%s)", handle, (int) b, reason ? reason : "" );
 	
 	/* It might be yourself! */
@@ -929,5 +920,5 @@
    them all from some wrappers. We'll start to define some down here: */
 
-int bim_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags )
+int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags )
 {
 	char *buf = NULL;
@@ -946,5 +937,5 @@
 }
 
-int bim_chat_msg( struct groupchat *c, char *msg, int flags )
+int imc_chat_msg( struct groupchat *c, char *msg, int flags )
 {
 	char *buf = NULL;
@@ -962,7 +953,7 @@
 }
 
-static char *bim_away_alias_find( GList *gcm, char *away );
-
-int bim_set_away( struct im_connection *ic, char *away )
+static char *imc_away_alias_find( GList *gcm, char *away );
+
+int imc_set_away( struct im_connection *ic, char *away )
 {
 	GList *m, *ms;
@@ -995,10 +986,10 @@
 	else
 	{
-		s = bim_away_alias_find( ms, away );
+		s = imc_away_alias_find( ms, away );
 		if( s )
 		{
 			ic->acc->prpl->set_away( ic, s, away );
 			if( set_getbool( &ic->irc->set, "debug" ) )
-				imc_log( ic, "Setting away state to %s", s );
+				imcb_log( ic, "Setting away state to %s", s );
 		}
 		else
@@ -1009,5 +1000,5 @@
 }
 
-static char *bim_away_alias_list[8][5] =
+static char *imc_away_alias_list[8][5] =
 {
 	{ "Away from computer", "Away", "Extended away", NULL },
@@ -1021,26 +1012,26 @@
 };
 
-static char *bim_away_alias_find( GList *gcm, char *away )
+static char *imc_away_alias_find( GList *gcm, char *away )
 {
 	GList *m;
 	int i, j;
 	
-	for( i = 0; *bim_away_alias_list[i]; i ++ )
-	{
-		for( j = 0; bim_away_alias_list[i][j]; j ++ )
-			if( g_strncasecmp( away, bim_away_alias_list[i][j], strlen( bim_away_alias_list[i][j] ) ) == 0 )
+	for( i = 0; *imc_away_alias_list[i]; i ++ )
+	{
+		for( j = 0; imc_away_alias_list[i][j]; j ++ )
+			if( g_strncasecmp( away, imc_away_alias_list[i][j], strlen( imc_away_alias_list[i][j] ) ) == 0 )
 				break;
 		
-		if( !bim_away_alias_list[i][j] )	/* If we reach the end, this row */
+		if( !imc_away_alias_list[i][j] )	/* If we reach the end, this row */
 			continue;			/* is not what we want. Next!    */
 		
 		/* Now find an entry in this row which exists in gcm */
-		for( j = 0; bim_away_alias_list[i][j]; j ++ )
+		for( j = 0; imc_away_alias_list[i][j]; j ++ )
 		{
 			m = gcm;
 			while( m )
 			{
-				if( g_strcasecmp( bim_away_alias_list[i][j], m->data ) == 0 )
-					return( bim_away_alias_list[i][j] );
+				if( g_strcasecmp( imc_away_alias_list[i][j], m->data ) == 0 )
+					return( imc_away_alias_list[i][j] );
 				m = m->next;
 			}
@@ -1051,5 +1042,5 @@
 }
 
-void bim_add_allow( struct im_connection *ic, char *handle )
+void imc_add_allow( struct im_connection *ic, char *handle )
 {
 	if( g_slist_find_custom( ic->permit, handle, (GCompareFunc) ic->acc->prpl->handle_cmp ) == NULL )
@@ -1061,5 +1052,5 @@
 }
 
-void bim_rem_allow( struct im_connection *ic, char *handle )
+void imc_rem_allow( struct im_connection *ic, char *handle )
 {
 	GSList *l;
@@ -1074,5 +1065,5 @@
 }
 
-void bim_add_block( struct im_connection *ic, char *handle )
+void imc_add_block( struct im_connection *ic, char *handle )
 {
 	if( g_slist_find_custom( ic->deny, handle, (GCompareFunc) ic->acc->prpl->handle_cmp ) == NULL )
@@ -1084,5 +1075,5 @@
 }
 
-void bim_rem_block( struct im_connection *ic, char *handle )
+void imc_rem_block( struct im_connection *ic, char *handle )
 {
 	GSList *l;
