comparison src/util.c @ 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 3366311426df
comparison
equal deleted inserted replaced
2042:d5033540df18 2043:1b8f4b90bf09
1177 break; 1177 break;
1178 } 1178 }
1179 } 1179 }
1180 1180
1181 1181
1182 void set_first_user(char *name)
1183 {
1184 struct aim_user *u;
1185
1186 u = find_user(name, -1);
1187
1188 if (!u) { /* new user */
1189 u = g_new0(struct aim_user, 1);
1190 g_snprintf(u->username, sizeof(u->username), "%s", name);
1191 u->protocol = DEFAULT_PROTO;
1192 aim_users = g_list_prepend(aim_users, u);
1193 } else { /* user already exists */
1194 aim_users = g_list_remove(aim_users, u);
1195 aim_users = g_list_prepend(aim_users, u);
1196 }
1197 save_prefs();
1198 }
1199
1200
1182 /* <name> is a comma-separated list of names, or NULL 1201 /* <name> is a comma-separated list of names, or NULL
1183 if NULL and there is at least one user defined in .gaimrc, try to login. 1202 if NULL and there is at least one user defined in .gaimrc, try to login.
1184 if not NULL, parse <name> into separate strings, look up each one in 1203 if not NULL, parse <name> into separate strings, look up each one in
1185 .gaimrc and, if it's there, try to login. 1204 .gaimrc and, if it's there, try to login.
1186 returns: 0 if successful 1205 returns: 0 if successful