changeset 9879:aef5f316b746

[gaim-migrate @ 10758] Huge thanks to Andrew Wellington for pointing out that I was sending the available message packet over the wrong connection. And these strings were only #if 0'ed out, so they're all translated like a Christina Aguilera song. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 26 Aug 2004 01:29:00 +0000
parents 706d9df5dcf1
children 0c2096ea15c5
files ChangeLog src/protocols/oscar/oscar.c src/protocols/oscar/service.c
diffstat 3 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 26 00:34:18 2004 +0000
+++ b/ChangeLog	Thu Aug 26 01:29:00 2004 +0000
@@ -2,6 +2,8 @@
 
 version 0.82 (08/26/2004):
 	New Features:
+	* Ability to set available messages for AIM
+	  (Tools->Account Actions->Set Available Message...)
 	* Ability to specify a custom character set for messages sent to ICQ
 	  users and messages received from ICQ users
 	* Ability to edit your current away message (Rhett Robinson)
--- a/src/protocols/oscar/oscar.c	Thu Aug 26 00:34:18 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Aug 26 01:29:00 2004 +0000
@@ -7043,7 +7043,6 @@
 					   _("Cancel"), NULL, gc);
 }
 
-#if 0
 static void oscar_setavailmsg(GaimConnection *gc, char *text) {
 	OscarData *od = (OscarData *)gc->proto_data;
 
@@ -7051,8 +7050,9 @@
 	aim_srv_setavailmsg(od->sess, text);
 }
 
-static void oscar_show_setavailmsg(GaimConnection *gc)
+static void oscar_show_setavailmsg(GaimPluginAction *action)
 {
+	GaimConnection *gc = (GaimConnection *) action->context;
 	gaim_request_input(gc, NULL, _("Available Message:"), NULL,
 					   _("I'm doing work and hoping for a distraction--IM me!"), 
 					   TRUE, FALSE, NULL,
@@ -7060,7 +7060,6 @@
 					   _("Cancel"), NULL,
 					   gc);
 }
-#endif
 
 static void oscar_show_set_info(GaimPluginAction *action)
 {
@@ -7146,11 +7145,11 @@
 		m = g_list_append(m, act);
 	}
 
-#if 0
-	act = gaim_plugin_action_new(_("Set Available Message..."),
-			oscar_show_setavailmsg);
-	m = g_list_append(m, act);
-#endif
+	if (!od->icq) {
+		act = gaim_plugin_action_new(_("Set Available Message..."),
+				oscar_show_setavailmsg);
+		m = g_list_append(m, act);
+	}
 
 	act = gaim_plugin_action_new(_("Change Password..."),
 			oscar_change_pass);
--- a/src/protocols/oscar/service.c	Thu Aug 26 00:34:18 2004 +0000
+++ b/src/protocols/oscar/service.c	Thu Aug 26 01:29:00 2004 +0000
@@ -797,7 +797,7 @@
 	aim_tlvlist_t *tl = NULL;
 	fu32_t data;
 
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
+	if (!sess || !(conn = aim_conn_findbygroup(sess, AIM_CB_FAM_MSG)))
 		return -EINVAL;
 
 	data = AIM_ICQ_STATE_HIDEIP | AIM_ICQ_STATE_WEBAWARE | status; /* yay for error checking ;^) */
@@ -832,7 +832,7 @@
 	aim_frame_t *fr;
 	aim_snacid_t snacid;
 
-	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0001)))
+	if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
 		return -EINVAL;
 
 	if (msg != NULL) {