src/protocols/oscar/oscar.c

changeset 7872
ba9aa581754b
parent 7871
91045fc717ea
child 7880
7ecddaff9e33
--- a/src/protocols/oscar/oscar.c	Sun Dec 14 18:33:00 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Dec 14 19:03:52 2003 +0000
@@ -3652,8 +3652,10 @@
 
 	gc->evil = (info->warnlevel/10.0) + 0.5;
 
-	if (info->onlinesince)
+	if (info->present & AIM_USERINFO_PRESENT_ONLINESINCE)
 		gc->login_time_official = info->onlinesince;
+	else if (info->present & AIM_USERINFO_PRESENT_SESSIONLEN)
+		gc->login_time_official = time(NULL) - info->sessionlen;
 
 	return 1;
 }

mercurial