diff src/protocols/oscar/auth.c @ 7282:ad243bc63184

[gaim-migrate @ 7861] Mostly this is my usual blah clean-up/changes. I started merging that icq sms patch, but I'm not comfortable with much of it... I also made AIM have 6 login steps instead of 2. The first few go pretty quickly though. I'll probably work on this more later, but I'm going to sleep now. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 16 Oct 2003 06:12:43 +0000
parents 0ed4d53c46f9
children be7c1468c6a7
line wrap: on
line diff
--- a/src/protocols/oscar/auth.c	Thu Oct 16 04:35:41 2003 +0000
+++ b/src/protocols/oscar/auth.c	Thu Oct 16 06:12:43 2003 +0000
@@ -11,6 +11,8 @@
 
 #include "md5.h"
 
+#include <ctype.h>
+
 /**
  * Encode a password using old XOR method
  *
@@ -221,11 +223,8 @@
 	if (!ci || !sn || !password)
 		return -EINVAL;
 
-	/*
-	 * What the XORLOGIN flag _really_ means is that its an ICQ login,
-	 * which is really stupid and painful, so its not done here.
-	 */
-	if (sess->flags & AIM_SESS_FLAGS_XORLOGIN)
+	/* If we're signing on an ICQ account then use the older, XOR login method */
+	if (isdigit(sn[0]))
 		return goddamnicq2(sess, conn, sn, password, ci);
 
 	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152)))
@@ -443,9 +442,6 @@
 	aim_frame_t fr;
 	aim_rxcallback_t userfunc;
 	
-	sess->flags &= ~AIM_SESS_FLAGS_SNACLOGIN;
-	sess->flags |= AIM_SESS_FLAGS_XORLOGIN;
-
 	fr.conn = conn;
 	
 	if ((userfunc = aim_callhandler(sess, conn, 0x0017, 0x0007)))
@@ -476,8 +472,6 @@
 	if ((sn[0] >= '0') && (sn[0] <= '9'))
 		return goddamnicq(sess, conn, sn);
 
-	sess->flags |= AIM_SESS_FLAGS_SNACLOGIN;
-
 	aim_sendflapver(sess, conn);
 
 	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2+2+strlen(sn) /*+8*/ )))