changeset 252:4a41f8323022

[gaim-migrate @ 262] Small changes. some things work better. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 22 May 2000 23:58:03 +0000
parents b1ff272bc495
children 5b28ef2b550e
files src/oscar.c src/server.c
diffstat 2 files changed, 39 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/oscar.c	Mon May 22 23:57:41 2000 +0000
+++ b/src/oscar.c	Mon May 22 23:58:03 2000 +0000
@@ -469,8 +469,28 @@
 		va_end(ap);
 
 		serv_got_im(userinfo->sn, msg, icbmflags & AIM_IMFLAGS_AWAY);
+	} else if (channel == 2) {
+		struct aim_userinfo_s *userinfo;
+		int rendtype = va_arg(ap, int);
+		if (rendtype == 0) {
+			char *msg, *encoding, *lang;
+			struct aim_chat_roominfo *roominfo;
+
+			userinfo = va_arg(ap, struct aim_userinfo_s *);
+			roominfo = va_arg(ap, struct aim_chat_roominfo *);
+			msg      = va_arg(ap, char *);
+			encoding = va_arg(ap, char *);
+			lang     = va_arg(ap, char *);
+			va_end(ap);
+
+			serv_got_chat_invite(roominfo->name,
+					     roominfo->instance,
+					     userinfo->sn,
+					     msg);
+		} else if (rendtype == 1) {
+			/* FIXME : voice chat */
+		}
 	}
-	/* FIXME : channel == 2 is RVOUS requests, including chat invitations */
 
 	return 1;
 }
@@ -526,7 +546,8 @@
 	va_end(ap);
 
 	if (prof == NULL || !strlen(prof)) {
-		do_error_dialog("User has no away message.", "Gaim - Away Msg");
+		do_error_dialog("User has no info/away message.",
+				"Gaim - User Info");
 		return 1;
 	}
 
--- a/src/server.c	Mon May 22 23:57:41 2000 +0000
+++ b/src/server.c	Mon May 22 23:58:03 2000 +0000
@@ -377,6 +377,8 @@
 	sflap_send(buf, -1, TYPE_DATA);
 #else
 	/* oscar requires us to do everyone at once (?) */
+/* FIXME : there's nothing wrong with this code, but it causes the entire buddy
+ * list to update, and can cause other people's buddy lists to improperly update
 	list = permit; at = 0;
 	while (list) {
 		at += g_snprintf(&buf[at], sizeof(buf) - at, "%s&", list->data);
@@ -391,6 +393,7 @@
 	}
 	aim_bos_changevisibility(gaim_sess, gaim_conn,
 			AIM_VISIBILITYCHANGE_DENYADD, buf);
+*/
 #endif
 }
 
@@ -443,6 +446,9 @@
         g_snprintf(buf, 255, "toc_chat_accept %d",  i);
         sflap_send(buf, -1, TYPE_DATA);
         g_free(buf);
+#else
+	/* this should never get called because libfaim doesn't use the id
+	 * (i'm not even sure Oscar does). go through serv_join_chat instead */
 #endif
 }
 
@@ -774,9 +780,15 @@
 
 static void chat_invite_callback(GtkWidget *w, GtkWidget *w2)
 {
+#ifndef USE_OSCAR
         int i = (int)gtk_object_get_user_data(GTK_OBJECT(w2));
         serv_accept_chat(i);
 	gtk_widget_destroy(w2);
+#else
+	char *i = (char *)gtk_object_get_user_data(GTK_OBJECT(w2));
+	serv_join_chat(0, i); /* for oscar, it doesn't use the id anyway */
+	gtk_widget_destroy(w2);
+#endif
 }
 
 
@@ -813,7 +825,11 @@
 
 
         /*		gtk_widget_set_usize(d, 200, 110); */
+#ifndef USE_OSCAR
         gtk_object_set_user_data(GTK_OBJECT(d), (void *)id);
+#else
+	gtk_object_set_user_data(GTK_OBJECT(d), (void *)name);
+#endif
 
 
         gtk_window_set_title(GTK_WINDOW(d), "Buddy chat invite");