Index: protocols/jabber/jabber.c
===================================================================
--- protocols/jabber/jabber.c	(revision 0a3c243b6659dc10efb227e507f324c2711d6dcd)
+++ protocols/jabber/jabber.c	(revision 75cde5d1d58025d6eae027d82b26e896d83cb041)
@@ -471,5 +471,5 @@
 }
 
-static gboolean jabber_callback(gpointer data, gint source, b_input_condition condition)
+static void jabber_callback(gpointer data, gint source, GaimInputCondition condition)
 {
 	struct gaim_connection *gc = (struct gaim_connection *)data;
@@ -477,6 +477,4 @@
 
 	gjab_recv(jd->gjc);
-	
-	return TRUE;
 }
 
@@ -489,5 +487,5 @@
 }
 
-static gboolean gjab_connected(gpointer data, gint source, b_input_condition cond)
+static void gjab_connected(gpointer data, gint source, GaimInputCondition cond)
 {
 	xmlnode x;
@@ -499,5 +497,5 @@
 	if (!g_slist_find(get_connections(), gc)) {
 		closesocket(source);
-		return FALSE;
+		return;
 	}
 
@@ -510,5 +508,5 @@
 	if (source == -1) {
 		STATE_EVT(JCONN_STATE_OFF)
-		return FALSE;
+		return;
 	}
 
@@ -532,10 +530,8 @@
 
 	gc = GJ_GC(gjc);
-	gc->inpa = b_input_add(gjc->fd, GAIM_INPUT_READ, jabber_callback, gc);
-	
-	return FALSE;
-}
-
-static gboolean gjab_connected_ssl(gpointer data, void *source, b_input_condition cond)
+	gc->inpa = gaim_input_add(gjc->fd, GAIM_INPUT_READ, jabber_callback, gc);
+}
+
+static void gjab_connected_ssl(gpointer data, void *source, GaimInputCondition cond)
 {
 	struct gaim_connection *gc = data;
@@ -548,18 +544,18 @@
 	if (source == NULL) {
 		STATE_EVT(JCONN_STATE_OFF)
-		return FALSE;
+		return;
 	}
 	
 	if (!g_slist_find(get_connections(), gc)) {
 		ssl_disconnect(source);
-		return FALSE;
+		return;
 	}
 	
-	return gjab_connected(data, gjc->fd, cond);
+	gjab_connected(data, gjc->fd, cond);
 }
 
 static void gjab_start(gjconn gjc)
 {
-	account_t *acc;
+	struct aim_user *user;
 	int port = -1, ssl = 0;
 	char *server = NULL, *s;
@@ -568,9 +564,9 @@
 		return;
 
-	acc = GJ_GC(gjc)->acc;
-	if (acc->server) {
+	user = GJ_GC(gjc)->user;
+	if (*user->proto_opt[0]) {
 		/* If there's a dot, assume there's a hostname in the beginning */
-		if (strchr(acc->server, '.')) {
-			server = g_strdup(acc->server);
+		if (strchr(user->proto_opt[0], '.')) {
+			server = g_strdup(user->proto_opt[0]);
 			if ((s = strchr(server, ':')))
 				*s = 0;
@@ -578,10 +574,10 @@
 		
 		/* After the hostname, there can be a port number */
-		s = strchr(acc->server, ':');
+		s = strchr(user->proto_opt[0], ':');
 		if (s && isdigit(s[1]))
 			sscanf(s + 1, "%d", &port);
 		
 		/* And if there's the string ssl, the user wants an SSL-connection */
-		if (strstr(acc->server, ":ssl") || g_strcasecmp(acc->server, "ssl") == 0)
+		if (strstr(user->proto_opt[0], ":ssl") || g_strcasecmp(user->proto_opt[0], "ssl") == 0)
 			ssl = 1;
 	}
@@ -616,5 +612,5 @@
 	g_free(server);
 	
-	if (!acc->gc || (gjc->fd < 0)) {
+	if (!user->gc || (gjc->fd < 0)) {
 		STATE_EVT(JCONN_STATE_OFF)
 		return;
@@ -1516,9 +1512,9 @@
 }
 
-static void jabber_login(account_t *acc)
-{
-	struct gaim_connection *gc = new_gaim_conn(acc);
+static void jabber_login(struct aim_user *user)
+{
+	struct gaim_connection *gc = new_gaim_conn(user);
 	struct jabber_data *jd = gc->proto_data = g_new0(struct jabber_data, 1);
-	char *loginname = create_valid_jid(acc->user, DEFAULT_SERVER, "BitlBee");
+	char *loginname = create_valid_jid(user->username, DEFAULT_SERVER, "BitlBee");
 
 	jd->hash = g_hash_table_new(g_str_hash, g_str_equal);
@@ -1527,5 +1523,5 @@
 	set_login_progress(gc, 1, _("Connecting"));
 
-	if (!(jd->gjc = gjab_new(loginname, acc->pass, gc))) {
+	if (!(jd->gjc = gjab_new(loginname, user->password, gc))) {
 		g_free(loginname);
 		hide_login_progress(gc, _("Unable to connect"));
@@ -1547,5 +1543,5 @@
 }
 
-static gboolean jabber_free(gpointer data, gint fd, b_input_condition cond)
+static gboolean jabber_free(gpointer data)
 {
 	struct jabber_data *jd = data;
@@ -1592,8 +1588,8 @@
 	}
 	if (gc->inpa)
-		b_event_remove(gc->inpa);
+		gaim_input_remove(gc->inpa);
 
 	if(jd) {
-		b_timeout_add(50, jabber_free, jd);
+		g_timeout_add(50, jabber_free, jd);
 		if(jd->gjc != NULL)
 			xmlnode_free(jd->gjc->current);
