diff src/main.c @ 6036:547ba881bc7e

[gaim-migrate @ 6486] Fix the --login=[NAME] command line argument. Fix the password prompt when signing on an account with no password set. I made some similar changes that probably fix problems with the filectl plugin, using gaim-remote to sign on an account, and signing on an account via perl script. (The change is calling gaim_account_connect() instead of serv_login().) Fix a silly compiler warning. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Jul 2003 22:24:57 +0000
parents 272c761c52e3
children 3a40666c08b4
line wrap: on
line diff
--- a/src/main.c	Sat Jul 05 21:54:19 2003 +0000
+++ b/src/main.c	Sat Jul 05 22:24:57 2003 +0000
@@ -230,7 +230,7 @@
 	const char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry));
 	const char *password = gtk_entry_get_text(GTK_ENTRY(pass));
 
-	if (!strlen(username)) {
+	if (*username == '\0') {
 		gaim_notify_error(NULL, NULL, _("Please enter your login."), NULL);
 		return;
 	}
@@ -246,7 +246,7 @@
 		gaim_account_set_remember_password(account, TRUE);
 	}
 
-	gaim_account_set_password(account, password);
+	gaim_account_set_password(account, (*password != '\0') ? password : NULL);
 
 	gaim_account_connect(account);
 }
@@ -271,7 +271,7 @@
 			if (account) {	/* found a user */
 				if (gaim_account_get_remember_password(account)) {
 					retval = 0;
-					serv_login(account);
+					gaim_account_connect(account);
 				}
 			}
 		}
@@ -281,7 +281,7 @@
 
 		if (gaim_account_get_remember_password(account)) {
 			retval = 0;
-			serv_login(account);
+			gaim_account_connect(account);
 		}
 	}