diff options
author | Sven Moritz Hallberg <pesco@khjk.org> | 2008-07-17 01:22:52 +0200 |
---|---|---|
committer | Sven Moritz Hallberg <pesco@khjk.org> | 2008-07-17 01:22:52 +0200 |
commit | 6738a676c7a3895988de4bd9eacfe8fa0ef73cc3 (patch) | |
tree | d95d913484cf79ff4a3c6d920a4d9b92ecd66de9 /account.c | |
parent | 9730d7250bb9e938ca00b72efdd8e8b3c03b2753 (diff) | |
parent | 6a78c0eed44820a2fefe1e96516e335eddc9c70b (diff) |
merge in latest trunk
Diffstat (limited to 'account.c')
-rw-r--r-- | account.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -181,19 +181,17 @@ void account_del( irc_t *irc, account_t *acc ) { account_t *a, *l = NULL; + if( acc->ic ) + /* Caller should have checked, accounts still in use can't be deleted. */ + return; + for( a = irc->accounts; a; a = (l=a)->next ) if( a == acc ) { - if( a->ic ) return; /* Caller should have checked, accounts still in use can't be deleted. */ - if( l ) - { l->next = a->next; - } else - { irc->accounts = a->next; - } while( a->set ) set_del( &a->set, a->set->key ); @@ -202,7 +200,7 @@ void account_del( irc_t *irc, account_t *acc ) g_free( a->user ); g_free( a->pass ); - if( a->server ) g_free( a->server ); + g_free( a->server ); if( a->reconnect ) /* This prevents any reconnect still queued to happen */ cancel_auto_reconnect( a ); g_free( a ); |