As I stated earlier, it sounds like at most, God gave the go ahead, and I don't believe they would have gotten any kind of message without a prophetic leader, so that is completely suspect to me. More likely they prayed, got the answer they wanted, and went ahead with the attack.
The latter sounds like the early Hebrew view that all things, good and bad, were what God allowed. If a conqueror killed an entire city of the Lord's people, the Lord caused (or allowed) such to happen. I would attribute this once again to a primitive understanding of the nature of God..."mankind's grubby fingerprints," as it seems to have come to be known.
Note the difference in the telling of 2 Samuel 24:1 vs. 1 Chronicles 21:1. It appears in Samuel (the earlier written book) that God told David to do something that later made God angry when David followed through. Meanwhile in Chronicles, we get the same story except that Satan told David to do it, and when David listened, God got angry. The conceptual development of the Devil came later down the road, and therefore everything in this world, good or bad, was once attribute to God because the world was before God and everything was in his hands. But the bad, or at least temptation, was later blamed on the Devil. God may still allow bad things to happen, and thus one might still say "The Lord had made a gap in the tribes of Israel," but this does not mean that God actually commanded people to be wicked.