CEDIT( cedit_delete )
{
    CLAN_DATA *pClan;
    DESCRIPTOR_DATA *d;
    int i, j, location;
    bool found = FALSE;

    EDIT_CLAN (ch, pClan);

    for (d = descriptor_list; d; d = d->next)
    {
        if (d->editor == ED_CLAN && pClan == d->pEdit)
                edit_done (d->character);
    }

    for (i = 0; i < (1 + top_clan); i++)
    {
        if (clan_table[i].name == pClan->name)
        {
                found = TRUE;
                location = i;
                break;
        }
    }

    if (!found)
    {
        logstr (LOG_BUG, "cedit_delete: clan '%s' not found", pClan->name);
        sendch ("Clan has already been deleted.\n\r", ch);
        return FALSE;
    }

    for (i = location; i < (1 + top_clan); ++i)
    {
        clan_table[i] = clan_table[i + 1];
        clan_table[i].name = clan_table[i + 1].name;
        clan_table[i].who_name = clan_table[i + 1].who_name;
        clan_table[i].leader = clan_table[i + 1].leader;

        for (j = 0; j < MAX_RANK; j++)
            clan_table[i].c_rank[j].rankname = clan_table[i + 1].c_rank[j].rankname;

        clan_table[i].flags = clan_table[i + 1].flags;
    }

    clan_table[top_clan] = clan_table[0];
    top_clan--;

    save_clans(ch, argument); //Updating file
    sendch ("Clan deleted.\n\r", ch);
    return TRUE;
}