src/account.c

changeset 5877
37695b88b248
parent 5875
493a921c0378
child 5879
a2757f3f2dda
--- a/src/account.c	Sun Jun 15 02:19:54 2003 +0000
+++ b/src/account.c	Sun Jun 15 03:17:41 2003 +0000
@@ -80,6 +80,7 @@
 } AccountParserData;
 
 static GList   *accounts = NULL;
+static GList   *active_accounts = NULL;
 static guint    accounts_save_timer = 0;
 static gboolean accounts_loaded = FALSE;
 
@@ -170,6 +171,9 @@
 
 	gaim_connection_connect(gc);
 
+	if (gaim_account_is_connected(account))
+		active_accounts = g_list_append(active_accounts, account);
+
 	return gc;
 }
 
@@ -181,6 +185,8 @@
 
 	gaim_connection_disconnect(account->gc);
 
+	active_accounts = g_list_remove(active_accounts, account);
+
 	account->gc = NULL;
 }
 
@@ -1265,6 +1271,12 @@
 	return accounts;
 }
 
+GList *
+gaim_accounts_get_active(void)
+{
+	return active_accounts;
+}
+
 GaimAccount *
 gaim_accounts_find(const char *name, GaimProtocol protocol)
 {

mercurial