# HG changeset patch # User Eric Warmenhoven # Date 992721617 0 # Node ID 1b8f4b90bf0927333d47ce04146ccaabc9ed7f4e # Parent d5033540df182279295f7c12f6cb7d14eb874653 [gaim-migrate @ 2053] whoops. committer: Tailor Script diff -r d5033540df18 -r 1b8f4b90bf09 src/util.c --- 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(); +} + + /* 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 into separate strings, look up each one in