diff options
Diffstat (limited to 'account.c')
-rw-r--r-- | account.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -189,6 +189,7 @@ account_t *account_get( irc_t *irc, char *id ) void account_del( irc_t *irc, account_t *acc ) { account_t *a, *l = NULL; + struct chat *c, *nc; if( acc->ic ) /* Caller should have checked, accounts still in use can't be deleted. */ @@ -202,6 +203,13 @@ void account_del( irc_t *irc, account_t *acc ) else irc->accounts = a->next; + for( c = irc->chatrooms; c; c = nc ) + { + nc = c->next; + if( acc == c->acc ) + chat_del( irc, c ); + } + while( a->set ) set_del( &a->set, a->set->key ); |