changeset 2043:1b8f4b90bf09

[gaim-migrate @ 2053] whoops. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 16 Jun 2001 20:00:17 +0000
parents d5033540df18
children cad4405a0a45
files src/util.c
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Sat Jun 16 19:53:23 2001 +0000
+++ b/src/util.c	Sat Jun 16 20:00:17 2001 +0000
@@ -1179,6 +1179,25 @@
 }
 
 
+void set_first_user(char *name)
+{
+	struct aim_user *u;
+
+	u = find_user(name, -1);
+
+	if (!u) {		/* new user */
+		u = g_new0(struct aim_user, 1);
+		g_snprintf(u->username, sizeof(u->username), "%s", name);
+		u->protocol = DEFAULT_PROTO;
+		aim_users = g_list_prepend(aim_users, u);
+	} else {		/* user already exists */
+		aim_users = g_list_remove(aim_users, u);
+		aim_users = g_list_prepend(aim_users, u);
+	}
+	save_prefs();
+}
+
+
 /* <name> is a comma-separated list of names, or NULL
    if NULL and there is at least one user defined in .gaimrc, try to login.
    if not NULL, parse <name> into separate strings, look up each one in