diff src/protocols/toc/toc.c @ 9927:fb08a0973b3e

[gaim-migrate @ 10819] " Currently, the "loggedin" parameter of serv_got_update() is of type int and used as a boolean. I updated it and all references to be gboolean. I also noticed that "presence" in gaim_blist_update_buddy_presence() is also a really boolean. of whether or not the buddy is currently online. There seemed to be some confusion, particularly in the silc plugin which tried to use a GaimBuddyPresenceState (coincidentally (or perhaps not) GAIM_BUDDY_OFFLINE and GAIM_BUDDY_ONLINE work as FALSE and TRUE respectively). The value passed to gaim_blist_update_buddy_presence() doesn't directly become the buddy presence state and this patch helps avoid confusion in this respect." --Daniel Atallah committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 01 Sep 2004 01:07:42 +0000
parents e74eb0d11f86
children b13013595c08
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Wed Sep 01 00:48:38 2004 +0000
+++ b/src/protocols/toc/toc.c	Wed Sep 01 01:07:42 2004 +0000
@@ -719,7 +719,8 @@
 		serv_got_im(gc, c, message, a, time(NULL));
 	} else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) {
 		char *l, *uc, *tmp;
-		int logged, evil, idle, type = 0;
+		gboolean logged_in;
+		int evil, idle, type = 0;
 		time_t signon, time_idle;
 
 		c = strtok(NULL, ":");	/* name */
@@ -729,7 +730,7 @@
 		sscanf(strtok(NULL, ":"), "%d", &idle);
 		uc = strtok(NULL, ":");
 
-		logged = (l && (*l == 'T')) ? 1 : 0;
+		logged_in = (l && (*l == 'T')) ? TRUE : FALSE;
 
 		if (uc[0] == 'A')
 			type |= UC_AOL;
@@ -770,7 +771,7 @@
 		}
 		g_free(tmp);
 
-		serv_got_update(gc, c, logged, evil, signon, time_idle, type);
+		serv_got_update(gc, c, logged_in, evil, signon, time_idle, type);
 	} else if (!g_ascii_strcasecmp(c, "ERROR")) {
 		gaim_notify_error(gc, NULL, show_error_message(), NULL);
 	} else if (!g_ascii_strcasecmp(c, "EVILED")) {