changeset 1995:815997c7d4f1

[gaim-migrate @ 2005] i think this might fix some things committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 11 Jun 2001 23:25:06 +0000
parents 0c8073b877d2
children fc0a285c207a
files src/multi.h src/server.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/multi.h	Mon Jun 11 23:17:02 2001 +0000
+++ b/src/multi.h	Mon Jun 11 23:25:06 2001 +0000
@@ -61,7 +61,7 @@
 	time_t login_time;
 	time_t lastsent;
 	int is_idle;
-	int correction_time;
+	time_t correction_time;
 
 	/* stuff for a signin progress meter */
 	GtkWidget *meter;
--- a/src/server.c	Mon Jun 11 23:17:02 2001 +0000
+++ b/src/server.c	Mon Jun 11 23:25:06 2001 +0000
@@ -114,6 +114,9 @@
 
 	time(&gc->login_time);
 
+	if (gc->prpl->options & OPT_PROTO_CORRECT_TIME)
+		serv_add_buddy(gc, gc->username);
+
 	update_keepalive(gc, TRUE);
 }
 
@@ -577,8 +580,10 @@
 
 	if (gc->prpl->options & OPT_PROTO_CORRECT_TIME) {
 		char *tmp = g_strdup(normalize(name));
-		if (!strcasecmp(tmp, normalize(gc->username)))
-			gc->correction_time = (int)(signon - gc->login_time);
+		if (!g_strcasecmp(tmp, normalize(gc->username))) {
+			gc->correction_time = (signon - gc->login_time);
+			update_idle_times();
+		}
 		g_free(tmp);
 	}