diff src/protocols/yahoo/yahoo.c @ 4491:3196d9044a45

[gaim-migrate @ 4766] aim_user is dead. long live gaim_account. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 31 Jan 2003 13:03:47 +0000
parents 2afc0f845e74
children 7e1591c6d0d8
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Fri Jan 31 06:51:49 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Fri Jan 31 13:03:47 2003 +0000
@@ -475,8 +475,8 @@
 			}
 			buddies = g_strsplit(split[1], ",", -1);
 			for (bud = buddies; bud && *bud; bud++)
-				if (!find_buddy(gc->user, *bud)) {
-					add_buddy(gc->user, split[0], *bud, *bud);
+				if (!find_buddy(gc->account, *bud)) {
+					add_buddy(gc->account, split[0], *bud, *bud);
 					export = TRUE;
 				}
 			g_strfreev(buddies);
@@ -519,7 +519,7 @@
 		else
 			serv_got_typing_stopped(gc, from);
 	} else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) {
-		struct buddy *bud = find_buddy(gc->user, from);
+		struct buddy *bud = find_buddy(gc->account, from);
 		void *free1=NULL, *free2=NULL;
 		if (!bud)
 			debug_printf("%s is playing a game, and doesn't want you to know.\n", from);
@@ -954,8 +954,8 @@
 	gc->inpa = gaim_input_add(yd->fd, GAIM_INPUT_READ, yahoo_pending, gc);
 }
 
-static void yahoo_login(struct aim_user *user) {
-	struct gaim_connection *gc = new_gaim_conn(user);
+static void yahoo_login(struct gaim_account *account) {
+	struct gaim_connection *gc = new_gaim_conn(account);
 	struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1);
 
 	set_login_progress(gc, 1, "Connecting");
@@ -965,19 +965,19 @@
 	yd->games = g_hash_table_new(g_str_hash, g_str_equal);
 
 
-	if (!g_strncasecmp(user->proto_opt[USEROPT_PAGERHOST], "cs.yahoo.com", strlen("cs.yahoo.com"))) {
+	if (!g_strncasecmp(account->proto_opt[USEROPT_PAGERHOST], "cs.yahoo.com", strlen("cs.yahoo.com"))) {
 		/* Figured out the new auth method -- cs.yahoo.com likes to disconnect on buddy remove and add now */
 		debug_printf("Setting new Yahoo! server.\n");
-		g_snprintf(user->proto_opt[USEROPT_PAGERHOST], strlen("scs.yahoo.com") + 1, "scs.yahoo.com");
+		g_snprintf(account->proto_opt[USEROPT_PAGERHOST], strlen("scs.yahoo.com") + 1, "scs.yahoo.com");
 		save_prefs();
 	}
-	
-    
-       	if (proxy_connect(user->proto_opt[USEROPT_PAGERHOST][0] ?
-				user->proto_opt[USEROPT_PAGERHOST] : YAHOO_PAGER_HOST,
-			   user->proto_opt[USEROPT_PAGERPORT][0] ?
-				atoi(user->proto_opt[USEROPT_PAGERPORT]) : YAHOO_PAGER_PORT,
-			   yahoo_got_connected, gc) != 0) {
+
+
+	if (proxy_connect(account->proto_opt[USEROPT_PAGERHOST][0] ?
+				account->proto_opt[USEROPT_PAGERHOST] : YAHOO_PAGER_HOST,
+				account->proto_opt[USEROPT_PAGERPORT][0] ?
+				atoi(account->proto_opt[USEROPT_PAGERPORT]) : YAHOO_PAGER_PORT,
+				yahoo_got_connected, gc) != 0) {
 		hide_login_progress(gc, "Connection problem");
 		signoff(gc);
 		return;
@@ -1069,7 +1069,7 @@
 	GList *m = NULL;
 	struct proto_buddy_menu *pbm;
 	struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
-	struct buddy *b = find_buddy(gc->user, who); /* this should never be null. if it is,
+	struct buddy *b = find_buddy(gc->account, who); /* this should never be null. if it is,
 						  segfault and get the bug report. */
 	static char buf[1024];
 	static char buf2[1024];
@@ -1311,7 +1311,7 @@
 	if (!yd->logged_in)
 		return;
 
-	g = find_group_by_buddy(find_buddy(gc->user, who));
+	g = find_group_by_buddy(find_buddy(gc->account, who));
 	if (g)
 		group = g->name;
 	else