diff src/protocols/oscar/oscar.c @ 9058:cde9fb3546ed

[gaim-migrate @ 9834] Removed OPT_PROTO_CORRECT_TIME and moved some functionality out of the core and into oscar.c and toc.c committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 25 May 2004 03:54:12 +0000
parents 7ab20f829190
children f13172eed3ad
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Tue May 25 02:10:48 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Tue May 25 03:54:12 2004 +0000
@@ -2680,6 +2680,7 @@
 
 static int gaim_parse_oncoming(aim_session_t *sess, aim_frame_t *fr, ...) {
 	GaimConnection *gc = sess->aux_data;
+	GaimAccount *account = gaim_connection_get_account(gc);
 	OscarData *od = gc->proto_data;
 	struct buddyinfo *bi;
 	time_t time_idle = 0, signon = 0;
@@ -2785,6 +2786,17 @@
 		g_free(b16);
 	}
 
+	/*
+	 * If we have info for ourselves, then update our local warning
+	 * level and set our official time of login.  Is this necessary?
+	 * XXX - This needs to be changed some how.  evil should not be
+	 * handled by the core at all?
+	 */
+	if (!aim_sncmp(info->sn, gaim_account_get_username(account))) {
+		gc->evil = (info->warnlevel/10.0);
+		gc->login_time_official = signon;
+	}
+
 	serv_got_update(gc, info->sn, 1, (info->warnlevel/10.0) + 0.5, signon, time_idle, type);
 
 	return 1;