changeset 5618:83991299705c

[gaim-migrate @ 6025] i really need to go grocery shopping committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 31 May 2003 20:55:31 +0000
parents feb012e01741
children 117e23960e48
files src/gaimrc.c src/protocols/gg/gg.c src/protocols/irc/irc.c
diffstat 3 files changed, 7 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaimrc.c	Sat May 31 18:55:17 2003 +0000
+++ b/src/gaimrc.c	Sat May 31 20:55:31 2003 +0000
@@ -503,6 +503,7 @@
 	char buf[4096];
 	char user_info[2048];
 	int flags;
+	char *tmp;
 
 	if (!fgets(buf, sizeof(buf), f))
 		return NULL;
@@ -579,15 +580,6 @@
 	if (strcmp(p->option, "proto_opts"))
 		return account;
 
-	/* TODO: Server and port should be preserved! :/ */
-#if 0
-	for (i = 0; i < 7; i++) {
-		char buf[256];
-
-		g_snprintf(account->proto_opt[i], sizeof account->proto_opt[i], "%s", p->value[i]);
-	}
-#endif
-
 	/* I hate this part. We must convert the protocol options. */
 	switch (gaim_account_get_protocol(account)) {
 		case GAIM_PROTO_TOC:
@@ -609,16 +601,15 @@
 			break;
 
 		case GAIM_PROTO_IRC:
-			/* XXX: fix this */
-			gaim_account_set_string(account, "server", p->value[0]);
+			if(strlen(p->value[0]) && !strchr(account->username, '@')) {
+				tmp = g_strdup_printf("%s@%s", account->username, p->value[0]);
+				gaim_account_set_username(account, tmp);
+				g_free(tmp);
+			}
 			gaim_account_set_int(account, "port", atoi(p->value[1]));
 			gaim_account_set_string(account, "charset", p->value[2]);
 			break;
 
-		case GAIM_PROTO_GADUGADU:
-			gaim_account_set_string(account, "nick", p->value[0]);
-			break;
-
 		default:
 			break;
 	}
--- a/src/protocols/gg/gg.c	Sat May 31 18:55:17 2003 +0000
+++ b/src/protocols/gg/gg.c	Sat May 31 20:55:31 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * gaim - Gadu-Gadu Protocol Plugin
- * $Id: gg.c 6009 2003-05-31 15:40:32Z faceprint $
+ * $Id: gg.c 6025 2003-05-31 20:55:31Z faceprint $
  *
  * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
  * 
@@ -528,8 +528,6 @@
 
 	gd->sess = g_new0(struct gg_session, 1);
 
-	gaim_connection_set_display_name(gc, gaim_account_get_string(account, "nick", ""));
-
 	gaim_connection_update_progress(gc, _("Looking up GG server"), 1, GG_CONNECT_STEPS);
 
 	if (invalid_uin(account->username)) {
--- a/src/protocols/irc/irc.c	Sat May 31 18:55:17 2003 +0000
+++ b/src/protocols/irc/irc.c	Sat May 31 20:55:31 2003 +0000
@@ -1946,15 +1946,6 @@
 	struct irc_data *idata;
 	char **parts;
 
-	if(!strrchr(username, '@')) {
-		char *tmp = g_strdup_printf("%s@%s", username,
-			    gaim_account_get_string(account, "server", DEFAULT_SERVER));
-		gaim_account_set_username(account, tmp);
-		/* XXX: delete function required */
-		gaim_account_set_string(account, "server", NULL);
-		g_free(tmp);
-	}
-
 	gc = gaim_account_get_connection(account);
 	idata = gc->proto_data = g_new0(struct irc_data, 1);