changeset 20629:77fda34d4289

A patch from Collin from ComBOTS, I guess. This fixes setting your buddy icon for ICQ accounts. Thanks Collin. Fixes #3209.
author Mark Doliner <mark@kingant.net>
date Sun, 23 Sep 2007 22:17:15 +0000
parents b8962a8c5daa
children 41dd71aa79d6
files libpurple/protocols/oscar/oscar.c libpurple/protocols/oscar/oscar.h
diffstat 2 files changed, 29 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Sun Sep 23 22:08:46 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sun Sep 23 22:17:15 2007 +0000
@@ -4,8 +4,9 @@
  * Some code copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
  * Some code copyright (C) 1999-2001, Eric Warmenhoven
  * Some code copyright (C) 2001-2003, Sean Egan
- * Some code copyright (C) 2001-2005, Mark Doliner <thekingant@users.sourceforge.net>
+ * Some code copyright (C) 2001-2007, Mark Doliner <thekingant@users.sourceforge.net>
  * Some code copyright (C) 2005, Jonathan Clark <ardentlygnarly@users.sourceforge.net>
+ * Some code copyright (C) 2007, ComBOTS Product GmbH (htfv) <foss@combots.com>
  *
  * Most libfaim code copyright (C) 1998-2001 Adam Fritzler <afritz@auk.cx>
  * Some libfaim code copyright (C) 2001-2004 Mark Doliner <thekingant@users.sourceforge.net>
@@ -1632,7 +1633,8 @@
 {
 	PurpleConnection *gc;
 	PurpleAccount *account;
-	ClientInfo info = CLIENTINFO_PURPLE;
+	ClientInfo aiminfo = CLIENTINFO_PURPLE_AIM;
+	ClientInfo icqinfo = CLIENTINFO_PURPLE_ICQ;
 	va_list ap;
 	char *key;
 	gboolean truncate_pass;
@@ -1647,7 +1649,7 @@
 
 	aim_send_login(od, conn, purple_account_get_username(account),
 			purple_connection_get_password(gc), truncate_pass,
-			&info, key);
+			od->icq ? &icqinfo : &aiminfo, key);
 
 	purple_connection_update_progress(gc, _("Password sent"), 2, OSCAR_CONNECT_STEPS);
 	ck[2] = 0x6c;
--- a/libpurple/protocols/oscar/oscar.h	Sun Sep 23 22:08:46 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.h	Sun Sep 23 22:17:15 2007 +0000
@@ -3,6 +3,8 @@
  * This file is the legal property of its developers.
  * Please see the AUTHORS file distributed alongside this file.
  *
+ * Some code copyright (C) 2007, ComBOTS Product GmbH (htfv) <foss@combots.com>
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -270,6 +272,15 @@
 	"us", "en", \
 }
 
+#define CLIENTINFO_ICQBASIC_14_34_3000 { \
+	"ICQBasic", \
+	0x010a, \
+	0x0014, 0x0034, \
+	0x0000, 0x0bb8, \
+	0x0000043d, \
+	"us", "en", \
+}
+
 #define CLIENTINFO_NETSCAPE_7_0_1 { \
 	"Netscape 2000 an approved user of AOL Instant Messenger (SM)", \
 	0x1d0d, \
@@ -280,10 +291,11 @@
 }
 
 /*
- * TODO: Use PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, and
- *       PURPLE_MICRO_VERSION?  Or did that break things?
+ * We need to use the major-minor-micro versions from the official
+ * AIM and ICQ programs here or AOL won't let us use certain features.
  */
-#define CLIENTINFO_PURPLE { \
+
+#define CLIENTINFO_PURPLE_AIM { \
 	"Purple/" VERSION, \
 	0x0109, \
 	0x0005, 0x0001, \
@@ -292,6 +304,15 @@
 	"us", "en", \
 }
 
+#define CLIENTINFO_PURPLE_ICQ { \
+	"Purple/" VERSION, \
+	0x010a, \
+	0x0014, 0x0034, \
+	0x0000, 0x0bb8, \
+	0x0000043d, \
+	"us", "en", \
+}
+
 #define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036
 #define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777